try { var ____json4fe = { catentry: [{ oid:'5', dispid: '5', name: '二手市场', listname: 'sale' }, { oid:'36', dispid: '36', name: '二手手机', listname: 'shouji' }, { dispid: '', name: '', listname: 'post5'}], locallist: { dispid: '172', name: '南京', listname: 'nj' }, modules: 'postpage', ext: { uploadurl:'/flashupload/',locallist: { 'current':{ dispid: '172', name: '南京', listname: 'nj' } , 'area':{dispid: '0', name: '', listname: ''}}} }} catch (e) { };
var myInfo = { infoID:'0', userid:0, loginstate:'', cityid:172, dispCityid:172, curDiscateid:36, rootCateName:'sale', currentCateName:'shouji', TopRoleMaxCount:0, CurrentPostCount:0, viewdata:{ baohushouji:''} };
var SWFUP = {
    url: "/s/uc/supply/imgUpload",         //文件上传地址
    picpath: "/upload/supply/big/,/upload/supply/big/small/,/upload/supply/big/tiny/",                   //保存图片的路径  这个可以在客户端设置?
    picsize: "640*0,240*0,100*75*3",                            //图片尺寸限制  大中小 其中  大与小只限制宽度  难道此flash可以自己压缩图片?不会后台压缩?
    picbulk: "0,0,0",                                           //体积限制
    dpi: "0,0,0",                                               //分辨率
    piccut: "0*0*0*0,0*0*0*0,0*0*100*75",
    picwater: "True,False,False",
    extension: "jpg",                                           //扩展名
    btImg0: "/component/imagesUpload/img/on.png",           //显示的按钮 图片  这地方应该必须要用绝对路径
    btImg1: "/component/imagesUpload/img/over.png",         //鼠标经过时显示的图片
    btImg2: "/component/imagesUpload/img/click.png",        //点击时显示的图片
    btImg3: "/component/imagesUpload/img/disable.png",      //禁用时显示的图片
    picMaxSize: 10485760,                                       //图片上传最大体积 10M
    getFlashBtn: function() {},                                 //获取flash按钮?
    getImgNum: function() {
        return UpImageShowBar.getImgNum();                      //图片数量
    },
    getUpsetting: function() {                                  //编辑的时候使用 默认使用新增同样的配置 也可自行调整
        return {
            url: this.url,
            picpath: this.picpath,
            picsize: this.picsize,
            picbulk: this.picbulk,
            dpi: this.dpi,
            piccut: this.piccut,
            picwater: this.picwater,
            extension: this.extension,
            btImg0: this.btImg0,
            btImg1: this.btImg1,
            btImg2: this.btImg2,
            btImg3: this.btImg3,
            picMaxSize: this.picMaxSize
        };
    },
    beginAdd: function(a) {                                     //开始添加
        return UpImageShowBar.beginAdd(a);
    },
    addImg: function(c) {                                       //图片上传以后的地址
        var b = SWFUP.picpath.split(",");                       //拆分地址
        c.url = b[0] + c.picName;                               //图片保存地址
        var e = UpImageShowBar.imgs;
        for (var d = 0; d < e.length; d++) {
            if (e[d].code == c.code) {
                e[d].url = c.url;
            }
        }
        var a = c.fileSize / 1024 / 1024;
        UpImageShowBar.addImg(c);               //UpImageShowBar 与 SWFUP有什么样的关系呢? 难是实现类与接口的关系?  SWFUP是继承 UpImageShowBar?但明显不是啊
    },
    getSWF: function(a) {                       //获取flash
        if (navigator.appName.indexOf("Microsoft") != -1) {             //如果不是IE
            return document.getElementById(a);
        } else {
            return document[a];                                         //如果是IE
        }
    },
    enableFlashBtn: function() {                                      //使按钮可用
        try {
            SWFUP.getSWF(SWFUP.name).setImgUpAble(true);
        } catch(b) {
            var a = arguments.callee;           //调用函数本身
            window.setTimeout(a, 3000);         //如果失败 3秒后重试
        }
    },
    disableFlashBtn: function() {
        try {
            SWFUP.getSWF(SWFUP.name).setImgUpAble(false);
        } catch(b) {
            var a = arguments.callee;
            window.setTimeout(a, 3000);
        }
    },
    delImg: function(a) {
        SWFUP.getSWF(SWFUP.name).imgDel(a);         //删除图片
    },
    showError: function(b) {
        var d = "",
            c = b.errorType,
            e = b.infoCode,
            a = b.fileName;
        if (c == "1") {
            d = "上传文件 " + a + " 时，发生超时错误。";
        } else {
            if (c == "2") {
                d = "上传文件 " + a + " 失败。";
            }
        }
        UpImageShowBar.setImgErr(e);
        UpImageShowBar.showError(d);
    },
    scrollFunc: function() {
        window.setTimeout(UpImageShowBar.hideMultSel, 5000);
        UpImageShowBar.container.parent().unbind("mouseover", SWFUP.scrollFunc);        //取消绑定
    },
    initFlashBtn: function(a) {             //初始化
        if (a.name) {
            this.name = a.name;
        }
        UpImageShowBar.container.parent().mouseover(SWFUP.scrollFunc);          //绑定函数
        UpImageShowBar.regEnableBtn(this.enableFlashBtn);                       //注册函数?
        UpImageShowBar.regDisableBtn(this.disableFlashBtn);
        UpImageShowBar.regDelImg(this.delImg);
    },
    setUpstate: function(a) {                           //设置更新状态  上传了多少 百分比
        if (a.state == "0") {                           //刚开始
            UpImageShowBar.setUpstate(a);
        } else {
            if (a.state == "1") {                       //开始上传
                var b = a.percent;                      //当前百分比
                if (b >= 60) {                          //大于 60%时
                    b = b + (100 - b) / 4;              //每次增长剩下的 四分之一
                } else {
                    b = b + 5 + parseInt(Math.random() * 10);       //每次增长一个 随机数加5
                }
                var a = {                                       //全局变量与局部变量冲突了,是有意的吗?
                    "code": a.code,
                    "percent": b,
                    "state": "1"
                };
                setTimeout(function() {                         //定时调用,用来显示滚动条  看来滚动务的值很假,不过应该有一定的意义
                        UpImageShowBar.setUpstate(a);
                        if (b < 99) {
                            SWFUP.setUpstate(a);                    //递归调用
                        }
                    },
                    500);
            }
        }
    }
};
var SINGLEUP = {                                                        //上传单个文件?
    url: "",
    picSize: -1,                                                        //无限制?
    picurl: "p1",                                                       //上传地址
    createIframe: function() {},                                        //生成iframe?
    addImg: function(b, a, c) {
        if (b == 1) {
            a = "http://pic.58.com/" + SINGLEUP.picurl + "/big" + a.substr(a.lastIndexOf("/"));
            UpImageShowBar.addImg({
                url: a,
                code: c
            });
        } else {
            UpImageShowBar.showError(a);
            UpImageShowBar.setImgErr(c);
        }
        $("iframe[name='frmUpload_" + c + "']").remove();
    },
    addImgLoad: function() {
        if ($(this).val() == "") {
            return;
        }
        UpImageShowBar.hideError();
        var b = UpImageShowBar.singleAdd();
        var a = SINGLEUP.getFileSize($("#fileUploadInput")[0]);
        if (a) {
            if (SINGLEUP.picSize > 0) {
                var c = SINGLEUP.picSize / 1024;
                if (c > 1024 * 2) {
                    UpImageShowBar.showError("不能上传大于2M的图片");
                    UpImageShowBar.setImgErr(b);
                    UpImageShowBar.resetInfo();
                    SINGLEUP.setFilePos();
                    return;
                }
            }
            SINGLEUP.initForm({
                code: b
            });
        } else {
            setTimeout(function() {
                    if (SINGLEUP.picSize > 0) {
                        var d = SINGLEUP.picSize / 1024;
                        if (d > 1024 * 2) {
                            UpImageShowBar.showError("不能上传大于2M的图片");
                            UpImageShowBar.setImgErr(b);
                            UpImageShowBar.resetInfo();
                            SINGLEUP.setFilePos();
                            return;
                        }
                    }
                    SINGLEUP.initForm({
                        code: b
                    });
                },
                700);
        }
        SINGLEUP.setFilePos();
        UpImageShowBar.resetInfo();
    },
    initForm: function(a) {
        $("#backFunction").after('<iframe width="1" height="1" name="frmUpload_' + a.code + '" ></iframe>');
        $("#SINGLEUP")[0].target = "frmUpload_" + a.code;
        $("#PicPos").val(a.code);
        $("#SINGLEUP").submit();
        SINGLEUP.upstate(0, a.code);
    },
    enableSingleBtn: function() {
        SINGLEUP.content.removeClass("w_localn").addClass("w_local");
        SINGLEUP.btnCon.show();
    },
    disableSingleBtn: function() {
        SINGLEUP.content.removeClass("w_local").addClass("w_localn");
        SINGLEUP.btnCon.hide();
    },
    delImg: function() {
        SINGLEUP.setFilePos();
    },
    setFilePos: function() {
        var a = SINGLEUP.content.offset();
        SINGLEUP.btnCon = $("#singleCon");
        SINGLEUP.btnCon.css({
            left: a.left + "px",
            top: a.top + "px"
        });
    },
    upstate: function(c, b) {
        if (c >= 60) {
            var c = c + (100 - c) / 4;
        } else {
            var c = c + 5 + parseInt(Math.random() * 10);
        }
        var a = {
            "code": b,
            "percent": c,
            "state": "1"
        };
        setTimeout(function() {
                UpImageShowBar.setUpstate(a);
                if (c < 99) {
                    SINGLEUP.upstate(c, b);
                }
            },
            1000);
    },
    getFileSize: function(b) {
        var c = false;
        try {
            if (b.files) {
                SINGLEUP.picSize = b.files[0].size;
                c = true;
            } else {
                var a = new Image();
                a.onload = function() {
                    SINGLEUP.picSize = a.fileSize;
                    a.onload = a.onerror = null;
                    delete a;
                };
                a.onerror = function() {
                    SINGLEUP.picSize = -1;
                    a.onload = a.onerror = null;
                    delete a;
                };
                a.src = b.value;
            }
        } catch(d) {
            SINGLEUP.picSize = -1;
        }
        return c;
    },
    initBtn: function(a) {
        SINGLEUP.url = a.url;
        if ($("#SINGLEUP").length <= 0) {
            var b = ['<form id="SINGLEUP" name="SINGLEUP" method="post" target="frmUpload_' + a.code + '" action="' + SINGLEUP.url + '" enctype="multipart/form-data">', '<span style="display:none"><input type="text" id="name" name="name" value="Jeky" />', '<input type="hidden" id="backFunction" name="backFunction" value="SINGLEUP.addImg" /><input type="hidden" name="__pic_dir" value="' + SINGLEUP.picurl + '" />', '<input type="hidden" name="PicPos" id="PicPos" value="' + a.code + '" /></span>', '<div id="singleCon" style="position:absolute;overflow:hidden"><input type="file" name="fileUploadInput" id="fileUploadInput" style="cursor:pointer" ></div></form>'];
            $(document.body).append(b.join(""));
        }
        $("#fileUploadInput").change(SINGLEUP.addImgLoad);
        SINGLEUP.content = $("#flashContent").parent();
        SINGLEUP.content.html("图片上传");
        SINGLEUP.content.mouseover(SINGLEUP.setFilePos);
        $("#singleCon").mouseover(SINGLEUP.setFilePos);
        UpImageShowBar.regEnableBtn(SINGLEUP.enableSingleBtn);
        UpImageShowBar.regDisableBtn(SINGLEUP.disableSingleBtn);
        UpImageShowBar.regDelImg(SINGLEUP.delImg);
        SINGLEUP.btnCon = $("#singleCon");
        SINGLEUP.btnCon.css({
            width: "85px",
            height: "25px"
        });
        SINGLEUP.setFilePos();
        SINGLEUP.upbtn = $("#fileUploadInput");
        SINGLEUP.upbtn.mouseover(function(c) {
            SINGLEUP.content.css({
                color: "#000",
                "text-decoration": "none"
            });
        }).mouseout(function(c) {
                SINGLEUP.content.css({
                    color: "#666",
                    "text-decoration": "none"
                });
            });
    }
};
var UpImageShowBar = {              //这个应该是最根本的,前面的只是进行二次封装
    "getImgNum": function() {
        var b = 0;
        for (var a = 0; a < this.imgs.length; a++) {
            if (this.imgs[a].url) {
                b++;
            }
        }
        return {
            hazNum: b,
            maxNum: this.imgMax
        };
    },
    "imgMax": 8,
    "imgs": [],
    "hazLabel": false,
    "labels": [],
    "flashName": "PictureUpload",           //flash名称
    "hazDetail": false,
    "maxFilsSize": 1024 * 1024 * 10,        //最大体积
    "container": null,                      //容器
    "indexCode": 0,
    "hideMultSel": function() {             //隐藏 多文件显示?
        $("#PictureUpload").next().hide();
    },
    "hasFlash": function() {                //判断浏览器是否技术flash
        var a = false;
        var b = "flash";
        for (var d = 0; d < navigator.plugins.length; d++) {                //循环判断 浏览器插件
            if (navigator.plugins[d].name.toLowerCase().indexOf(b) > -1) {
                a = true;
                break;
            }
        }
        if (!a) {                   //如果存在flash插件
            try {
                b = "ShockwaveFlash.ShockwaveFlash";
                new ActiveXObject(b);                   //实例化一个插件
                a = true;
            } catch(c) {
                a = false;
            }
        }
        return a;
    },
    "regEnableBtn": function(a) {               //不明白这样写有什么意义
        if (!this.enableBtnFuncs) {
            this.enableBtnFuncs = [];
        }
        this.enableBtnFuncs.push(a);
    },
    "enableBtns": function() {
        if (!this.enableBtnFuncs) {
            return;
        }
        for (var a = 0; a < this.enableBtnFuncs.length; a++) {
            this.enableBtnFuncs[a]();
        }
    },
    "regDisableBtn": function(a) {
        if (!this.disableBtnFuncs) {
            this.disableBtnFuncs = [];
        }
        this.disableBtnFuncs.push(a);
    },
    "disableBtns": function() {
        if (!this.disableBtnFuncs) {
            return;
        }
        for (var a = 0; a < this.disableBtnFuncs.length; a++) {
            this.disableBtnFuncs[a]();
        }
    },
    "regDelImg": function(a) {              //不明白JS是如何怎样控制flash的?如何取得 flash上传已后的返回值的? js可以调用flash的接口?
        if (!this.delImgs) {
            this.delImgs = [];
        }
        this.delImgs.push(a);
    },
    "getIndexCode": function() {        //有什么意义?
        return this.indexCode++;
    },
    addImg: function(c, d) {
        if (d && this.imgs.length >= this.imgMax) {
            this.disableBtns();
            var e = "您选择的图片数量超过允许总量，多余图片将不会上传！";
            this.showError(e);
            return false;
        }
        var a = [];
        if (d) {
            c.code = this.getIndexCode();       //是不是和顺序有关呢?
        }
        a.push('<div code="' + c.code + '" class="imgbox">');       //生成相关html用于显示图片 这个上传图片的swf是由58同城的开发人员自己开发的?
        if (this.hazLabel) {
            a.push('<span class="img_selector"><span class="seltext">' + (c.label ? c.label: this.labels[0]) + "</span>");
            a.push('<ul style="width:79px" class="hc">');
            for (var b = 1; b < this.labels.length; b++) {
                a.push('<li ><a href="javascript:void(0)" >' + this.labels[b] + "</a></li>");
            }
            a.push('<i class="shadow"></i></ul></span>');
        }
        a.push('<div class="w_upload"><a class="item_close" href="javascript:void(0)">删除</a><span class="item_box">');
        a.push('<img  src="' + c.url.replace("big", "tiny") + '"></span><div class="isfenmian" style="display:none"></div><div class="setfenmian"></div>');
        if (this.hazDetail) {
            a.push('<span class="item_input"><i class="tline hc"></i><textarea name="" cols="3" rows="4" class="c_ccc" >' + (c.detail ? c.detail: "图片描述...") + '</textarea>	<em class="hc">按Enter保存，Esc取消</em><i class="shadow hc"></i></span>');
        }
        a.push("</div></div>");
        if (d) {
            this.container.append(a.join(""));
            this.imgs.push(c);
            this.rbTAEvent(c.code);
        } else {
            for (var b = 0; b < this.imgs.length; b++) {
                if (this.imgs[b].code == c.code) {
                    this.imgs[b] = c;
                    break;
                }
            }
            this.container.find("[code=" + c.code + "]").replaceWith(a.join(""));
            this.rbTAEvent(c.code);
        }
        this.initFenmian();
        if (this.container.find(".imgbox").length >= this.imgMax) {
            this.disableBtns();
        }
        this.resetInfo();
    },
    addLaod: function(b) {
        if (this.imgs.length >= this.imgMax) {
            this.disableBtns();
            var c = "您选择的图片数量超过允许总量，多余图片将不会上传！";
            this.showError(c);
            return false;
        }
        var a = [];
        a.push('<div code="' + b.code + '" class="imgbox loading"><div class="w_upload"><a class="item_close" href="javascript:void(0)">关闭</a>	<span class="wait_con"><p class="pershow">等待中…</p><div class="wait_loading"><div class="loading_progress" style="width:0%"></div></div></span><span class="wait clearfix">图片上传中</span></div></div>');
        this.container.append(a.join(""));
        this.imgs.push(b);
        this.container.show();
        if (this.container.find(".imgbox").length >= this.imgMax) {
            this.disableBtns();
        }
    },
    "beginAdd": function(b) {
        $("#hazupinfo").show();
        $("#uploadEx").hide();
        this.hideError();
        var e = "";
        if (b.num + this.imgs.length > this.imgMax) {
            e = "您选择的图片数量超过允许总量，多余图片将不会上传！";
            this.showError(e);
        } else {
            if (b.hazOver) {
                e = "您选择的部分图片超过允许大小总量，这些图片将不会上传！";
                this.showError(e);
            }
        }
        var a = [];
        for (var c = 0; c < b.num && c < this.imgMax; c++) {
            var d = this.getIndexCode();
            a.push(d);
            this.addLaod({
                "code": d
            });
        }
        if (this.container.find(".imgbox").length >= this.imgMax) {
            this.disableBtns();
        }
        return a;
    },
    singleAdd: function() {
        var a = this.getIndexCode();
        this.addLaod({
            "code": a
        });
        this.resetInfo();
        return a;
    },
    showError: function(a) {
        $.formValidator.setTipState(null, "onError", a, "upload_Tip");
        $("#upload_Tip").show();
    },
    hideError: function(a) {
        $("#upload_Tip").hide();
        $("#upload_Tip").find(".action_po_top").html("");
    },
    delImg: function(c) {
        this.container.find(".imgbox[code='" + c + "']").replaceWith("");
        this.hideError();
        this.resetInfo();
        var b = "";
        for (var d = 0; d < this.imgs.length; d++) {
            if (this.imgs[d].code == c) {
                b = this.imgs[d].url;
                this.imgs = this.imgs.slice(0, d).concat(this.imgs.slice(d + 1));
                break;
            }
        }
        if (this.imgs.length < this.imgMax) {
            this.enableBtns();
        }
        this.resetInfo();
        for (var a = 0; a < this.delImgs.length; a++) {
            this.delImgs[a](c, b);
        }
        this.initFenmian();
    },
    setImgErr: function(a) {
        this.container.find(".imgbox[code='" + a + "']").find("span.wait_con").css("backgroundImage", "url(/test/uploaderro.gif)").css("background-repeat","no-repeat");
        this.container.find(".imgbox[code='" + a + "']").find("span.wait").html("&nbsp;&nbsp;&nbsp;&nbsp;");
    },
    resetInfo: function() {
        var a = this.getImgNum();
        $(".upnum").html(a.hazNum);
        $(".maxnum").html(a.maxNum);
        if (a.hazNum > 0) {
            $("#hazupinfo").show();
            $("#uploadEx").hide();
            this.container.show();
        } else {
            if (this.container.find(".imgbox").length <= 0) {
                $("#hazupinfo").hide();
                $("#uploadEx").show();
                this.container.hide();
            }
        }
    },
    rbTAEvent: function(a) {
        this.container.find(".imgbox[code=" + a + "]").find("textarea").focus(function(b) {
            var c = $(b.target);
            if (c.val() == "图片描述...") {
                c.val("");
            }
            c.removeClass("c_ccc").addClass("c_666");
            c.parents(".item_input").addClass("on");
            c.parents(".imgbox").css({
                "z-index": "99"
            });
        });
        this.container.find(".imgbox[code=" + a + "]").find("textarea").blur(function(b) {
            var d = $(b.target);
            if (d.val() == "") {
                d.val("图片描述...");
                d.removeClass("c_666").addClass("c_ccc");
            }
            if (d.val().length > 50) {
                d.val($(this).val().substring(0, 50));
            }
            var c = d.parents(".imgbox").attr("code");
            UpImageShowBar.setDetail($(this).val(), c);
            d.parents(".item_input").removeClass("on");
            d.parents(".imgbox").css({
                "z-index": ""
            });
        });
        this.container.find(".imgbox[code=" + a + "]").find("textarea").keyup(function(b) {
            var d = $(b.target);
            var c = d.parents(".imgbox").attr("code");
            if (b.which == 13) {
                $(this).val($(this).val().replace("\n", ""));
                $(this).blur();
                return false;
            } else {
                if (b.which == 27) {
                    $(this).val(UpImageShowBar.getDetail(c));
                    $(this).blur();
                    return false;
                } else {
                    if ($(this).val().length > 50) {
                        $(this).val($(this).val().substring(0, 50));
                    }
                }
            }
        });
    },
    setDetail: function(c, b) {
        var d = UpImageShowBar.imgs;
        for (var a = 0; a < d.length; a++) {
            if (d[a].code == b) {
                UpImageShowBar.imgs[a].detail = c;
                return d[a];
            }
        }
    },
    getDetail: function(b) {
        var c = UpImageShowBar.imgs;
        for (var a = 0; a < c.length; a++) {
            if (c[a].code == b) {
                return c[a].detail;
            }
        }
    },
    getImgs: function() {
        var a = [];
        for (var b = 0; b < this.imgs.length; b++) {
            if (this.imgs[b].url && this.imgs[b].url.indexOf(".") >= 0) {
                a.push(this.imgs[b]);
            }
        }
        return a;
    },
    initFenmian: function() {
        this.container.find(".isfenmian:eq(0)").show();
        this.container.find(".isfenmian:gt(0)").hide();
        if (this.getFImgSize && this.imgs.length > 0 && this.imgs[0].url) {
            var a = this.imgs[0].url.match(/n_\d+/)[0];
            if (!UpImageShowBar.fileSizes[a]) {             //图片的体积信息通过json来传递
                $.getJSON("http://post.image.58.com/imginfo.do?pic=" + this.imgs[0].url.replace("http://pic.58.com", "") + "&callback=?",
                    function(c) {
                        var b = {
                            "width": c.width,
                            "height": c.height
                        };
                        UpImageShowBar.FSize = b;
                        UpImageShowBar.fileSizes[a] = b;
                    });
            } else {
                UpImageShowBar.FSize = UpImageShowBar.fileSizes[a];
            }
        }
    },
    setUpstate: function(a) {           //设置进度条内容
        if (a) {
            var b = this.container.find(".imgbox[code='" + a.code + "'] .wait_con");
            if (a.state == "0") {
                b.find("p").html("本地压缩中...");
            } else {
                if (a.state == "1") {
                    b.find("p").html(parseInt(a.percent) + "%");
                    b.find(".loading_progress").width(a.percent + "%");
                }
            }
        }
    },
    initBar: function(c) {          //重点!!!! 初始化啊
        this.container = $("#" + c.container);          //找到当前地址
        if (c.labels && c.labels.length > 0) {
            this.labels = c.labels;
            this.hazLabel = true;
        }
        if (c.flashName) {
            this.flashName = c.flashName;
        }
        if (c.hazDetail == true) {
            this.hazDetail = true;
        }
        if (c.maxFilsSize) {
            this.maxFilsSize = c.maxFilsSize;
        }
        if (c.imgMax) {
            this.imgMax = c.imgMax;
        }
        if (c.getFImgSize) {
            this.getFImgSize = c.getFImgSize;
            UpImageShowBar.fileSizes = {};
        }
        var l = $("#flashContent").parent().next();
        var n = swfobject.getFlashPlayerVersion();          //获取flash的版本
        if (this.hasFlash() && (n.major > 10 || (n.major >= 10 && n.minor >= 3))) {         //如果存在flash 而且版本较高
            var a = "10.2.0";
            var h = "/component/imagesUpload/playerProductInstall.swf";        //安装地址
            var b = {};
            var e = {};
            e.quality = "high";
            e.bgcolor = "#ffffff";
            e.allowscriptaccess = "always";
            e.allowfullscreen = "false";
            e.wmode = "opaque";
            var f = {};
            f.id = this.flashName;
            f.name = this.flashName;
            f.align = "left";
            swfobject.embedSWF("/component/imagesUpload/PictureUpload.swf", "flashContent", "86", "30", a, h, b, e, f);           //动态加载flash到flashContent之中 并设置相应的参数
            swfobject.createCSS("#flashContent", "display:block;text-align:left;");     //设置显示的css
            SWFUP.initFlashBtn({            //初始化 看来 还是离不开SWFUP对像的
                name: this.flashName
            });
            $("#size_limit").html("10");        //这里每有必要吗,前台不是已经显示了吗?
            $("photo_type").html("jpg/gif/png");
            if (navigator.platform.indexOf("Mac") > -1) {       //如果是Mac平台的话
                var d = $($(".w_local span").get(1));
                d.html(d.html().replace("Ctrl", "command"));
                if (d.html().indexOf("command") > -1) {
                    d.width(d.width() + 30);
                }
            }
        } else {            //如果不存在flash的话,那么则只能使用单文件上传的方式
            this.resetInfo();
            $("#size_limit").html("2");     //最多只能传两张图片
            $("photo_type").html("jpg/gif/bmp/png");
            SINGLEUP.initBtn({
                url: "http://post.image.58.com/upload"      //上传路径也不相同
            });
        }
        this.container.html("");                    //清空内容
        if (c.images && c.images.length > 0) {              //更新时会用的到
            for (var g = 0; g < c.images.length; g++) {
                this.addImg(c.images[g], true);
            }
            this.resetInfo();
        } else {
            this.resetInfo();
        }
        this.container.bind("click", this,
            function(y) {
                var i = $(y.target);            //点击的目标
                if (i.hasClass("item_close")) {         //删除图片
                    y.data.delImg(i.parents(".imgbox").attr("code"));
                    return false;
                } else {
                    if (i.parents("ul.hc").length > 0) {
                        var s = i.parents(".imgbox");
                        s.find(".seltext").html(i.html());
                        var v = s.prevAll().length;
                        y.data.imgs[v].label = i.html();
                        var x = s.find(".hover");
                        x.removeClass("hover");
                        return false;
                    } else {
                        if (i.hasClass("setfenmian")) {         //如果是设置封面
                            var r = i.parents(".imgbox");
                            var t = UpImageShowBar.container.find(".imgbox");
                            var w = t.index(r);
                            if (w == 0) {
                                return;
                            }
                            t.eq(w).before(t.eq(0)).find(".setfenmian").hide();
                            UpImageShowBar.container.prepend(r);
                            UpImageShowBar.initFenmian();
                            var u = UpImageShowBar.imgs[w];             //对换一下位置
                            UpImageShowBar.imgs[w] = UpImageShowBar.imgs[0];
                            UpImageShowBar.imgs[0] = u;
                        }
                    }
                }
            });
        this.container.bind("mouseover", this,              //鼠标经过时显示 设置封面
            function(i) {
                var r = $(i.target);
                if (r.hasClass("img_selector")) {
                    r.addClass("hover");
                } else {
                    if (r.parents(".img_selector").length > 0) {
                        r.parents(".img_selector").addClass("hover");
                    } else {
                        if (r.parents(".w_upload").length > 0 && r.parents(".w_upload").find(".isfenmian:visible").length == 0) {
                            r.parents(".w_upload").find(".setfenmian").css("opacity", 0.7).show();
                        }
                    }
                }
            }).bind("mouseout", this,                   //鼠标移走时,隐藏设置封面
            function(i) {
                var r = $(i.target);
                if (r.hasClass("img_selector")) {
                    r.removeClass("hover");
                } else {
                    if (r.parents(".img_selector").length > 0) {
                        r.parents(".img_selector").removeClass("hover");
                    } else {
                        if (r.parents(".w_upload").length > 0) {
                            r.parents(".w_upload").find(".setfenmian").hide();
                        }
                    }
                }
            });
    }
};

/*	SWFObject v2.2 <http://code.google.com/p/swfobject/>
 is released under the MIT License <http://www.opensource.org/licenses/mit-license.php>
 */
var swfobject=function(){var D="undefined",r="object",S="Shockwave Flash",W="ShockwaveFlash.ShockwaveFlash",q="application/x-shockwave-flash",R="SWFObjectExprInst",x="onreadystatechange",O=window,j=document,t=navigator,T=false,U=[h],o=[],N=[],I=[],l,Q,E,B,J=false,a=false,n,G,m=true,M=function(){var aa=typeof j.getElementById!=D&&typeof j.getElementsByTagName!=D&&typeof j.createElement!=D,ah=t.userAgent.toLowerCase(),Y=t.platform.toLowerCase(),ae=Y?/win/.test(Y):/win/.test(ah),ac=Y?/mac/.test(Y):/mac/.test(ah),af=/webkit/.test(ah)?parseFloat(ah.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,X=!+"\v1",ag=[0,0,0],ab=null;if(typeof t.plugins!=D&&typeof t.plugins[S]==r){ab=t.plugins[S].description;if(ab&&!(typeof t.mimeTypes!=D&&t.mimeTypes[q]&&!t.mimeTypes[q].enabledPlugin)){T=true;X=false;ab=ab.replace(/^.*\s+(\S+\s+\S+$)/,"$1");ag[0]=parseInt(ab.replace(/^(.*)\..*$/,"$1"),10);ag[1]=parseInt(ab.replace(/^.*\.(.*)\s.*$/,"$1"),10);ag[2]=/[a-zA-Z]/.test(ab)?parseInt(ab.replace(/^.*[a-zA-Z]+(.*)$/,"$1"),10):0}}else{if(typeof O.ActiveXObject!=D){try{var ad=new ActiveXObject(W);if(ad){ab=ad.GetVariable("$version");if(ab){X=true;ab=ab.split(" ")[1].split(",");ag=[parseInt(ab[0],10),parseInt(ab[1],10),parseInt(ab[2],10)]}}}catch(Z){}}}return{w3:aa,pv:ag,wk:af,ie:X,win:ae,mac:ac}}(),k=function(){if(!M.w3){return}if((typeof j.readyState!=D&&j.readyState=="complete")||(typeof j.readyState==D&&(j.getElementsByTagName("body")[0]||j.body))){f()}if(!J){if(typeof j.addEventListener!=D){j.addEventListener("DOMContentLoaded",f,false)}if(M.ie&&M.win){j.attachEvent(x,function(){if(j.readyState=="complete"){j.detachEvent(x,arguments.callee);f()}});if(O==top){(function(){if(J){return}try{j.documentElement.doScroll("left")}catch(X){setTimeout(arguments.callee,0);return}f()})()}}if(M.wk){(function(){if(J){return}if(!/loaded|complete/.test(j.readyState)){setTimeout(arguments.callee,0);return}f()})()}s(f)}}();function f(){if(J){return}try{var Z=j.getElementsByTagName("body")[0].appendChild(C("span"));Z.parentNode.removeChild(Z)}catch(aa){return}J=true;var X=U.length;for(var Y=0;Y<X;Y++){U[Y]()}}function K(X){if(J){X()}else{U[U.length]=X}}function s(Y){if(typeof O.addEventListener!=D){O.addEventListener("load",Y,false)}else{if(typeof j.addEventListener!=D){j.addEventListener("load",Y,false)}else{if(typeof O.attachEvent!=D){i(O,"onload",Y)}else{if(typeof O.onload=="function"){var X=O.onload;O.onload=function(){X();Y()}}else{O.onload=Y}}}}}function h(){if(T){V()}else{H()}}function V(){var X=j.getElementsByTagName("body")[0];var aa=C(r);aa.setAttribute("type",q);var Z=X.appendChild(aa);if(Z){var Y=0;(function(){if(typeof Z.GetVariable!=D){var ab=Z.GetVariable("$version");if(ab){ab=ab.split(" ")[1].split(",");M.pv=[parseInt(ab[0],10),parseInt(ab[1],10),parseInt(ab[2],10)]}}else{if(Y<10){Y++;setTimeout(arguments.callee,10);return}}X.removeChild(aa);Z=null;H()})()}else{H()}}function H(){var ag=o.length;if(ag>0){for(var af=0;af<ag;af++){var Y=o[af].id;var ab=o[af].callbackFn;var aa={success:false,id:Y};if(M.pv[0]>0){var ae=c(Y);if(ae){if(F(o[af].swfVersion)&&!(M.wk&&M.wk<312)){w(Y,true);if(ab){aa.success=true;aa.ref=z(Y);ab(aa)}}else{if(o[af].expressInstall&&A()){var ai={};ai.data=o[af].expressInstall;ai.width=ae.getAttribute("width")||"0";ai.height=ae.getAttribute("height")||"0";if(ae.getAttribute("class")){ai.styleclass=ae.getAttribute("class")}if(ae.getAttribute("align")){ai.align=ae.getAttribute("align")}var ah={};var X=ae.getElementsByTagName("param");var ac=X.length;for(var ad=0;ad<ac;ad++){if(X[ad].getAttribute("name").toLowerCase()!="movie"){ah[X[ad].getAttribute("name")]=X[ad].getAttribute("value")}}P(ai,ah,Y,ab)}else{p(ae);if(ab){ab(aa)}}}}}else{w(Y,true);if(ab){var Z=z(Y);if(Z&&typeof Z.SetVariable!=D){aa.success=true;aa.ref=Z}ab(aa)}}}}}function z(aa){var X=null;var Y=c(aa);if(Y&&Y.nodeName=="OBJECT"){if(typeof Y.SetVariable!=D){X=Y}else{var Z=Y.getElementsByTagName(r)[0];if(Z){X=Z}}}return X}function A(){return !a&&F("6.0.65")&&(M.win||M.mac)&&!(M.wk&&M.wk<312)}function P(aa,ab,X,Z){a=true;E=Z||null;B={success:false,id:X};var ae=c(X);if(ae){if(ae.nodeName=="OBJECT"){l=g(ae);Q=null}else{l=ae;Q=X}aa.id=R;if(typeof aa.width==D||(!/%$/.test(aa.width)&&parseInt(aa.width,10)<310)){aa.width="310"}if(typeof aa.height==D||(!/%$/.test(aa.height)&&parseInt(aa.height,10)<137)){aa.height="137"}j.title=j.title.slice(0,47)+" - Flash Player Installation";var ad=M.ie&&M.win?"ActiveX":"PlugIn",ac="MMredirectURL="+O.location.toString().replace(/&/g,"%26")+"&MMplayerType="+ad+"&MMdoctitle="+j.title;if(typeof ab.flashvars!=D){ab.flashvars+="&"+ac}else{ab.flashvars=ac}if(M.ie&&M.win&&ae.readyState!=4){var Y=C("div");X+="SWFObjectNew";Y.setAttribute("id",X);ae.parentNode.insertBefore(Y,ae);ae.style.display="none";(function(){if(ae.readyState==4){ae.parentNode.removeChild(ae)}else{setTimeout(arguments.callee,10)}})()}u(aa,ab,X)}}function p(Y){if(M.ie&&M.win&&Y.readyState!=4){var X=C("div");Y.parentNode.insertBefore(X,Y);X.parentNode.replaceChild(g(Y),X);Y.style.display="none";(function(){if(Y.readyState==4){Y.parentNode.removeChild(Y)}else{setTimeout(arguments.callee,10)}})()}else{Y.parentNode.replaceChild(g(Y),Y)}}function g(ab){var aa=C("div");if(M.win&&M.ie){aa.innerHTML=ab.innerHTML}else{var Y=ab.getElementsByTagName(r)[0];if(Y){var ad=Y.childNodes;if(ad){var X=ad.length;for(var Z=0;Z<X;Z++){if(!(ad[Z].nodeType==1&&ad[Z].nodeName=="PARAM")&&!(ad[Z].nodeType==8)){aa.appendChild(ad[Z].cloneNode(true))}}}}}return aa}function u(ai,ag,Y){var X,aa=c(Y);if(M.wk&&M.wk<312){return X}if(aa){if(typeof ai.id==D){ai.id=Y}if(M.ie&&M.win){var ah="";for(var ae in ai){if(ai[ae]!=Object.prototype[ae]){if(ae.toLowerCase()=="data"){ag.movie=ai[ae]}else{if(ae.toLowerCase()=="styleclass"){ah+=' class="'+ai[ae]+'"'}else{if(ae.toLowerCase()!="classid"){ah+=" "+ae+'="'+ai[ae]+'"'}}}}}var af="";for(var ad in ag){if(ag[ad]!=Object.prototype[ad]){af+='<param name="'+ad+'" value="'+ag[ad]+'" />'}}aa.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+ah+">"+af+"</object>";N[N.length]=ai.id;X=c(ai.id)}else{var Z=C(r);Z.setAttribute("type",q);for(var ac in ai){if(ai[ac]!=Object.prototype[ac]){if(ac.toLowerCase()=="styleclass"){Z.setAttribute("class",ai[ac])}else{if(ac.toLowerCase()!="classid"){Z.setAttribute(ac,ai[ac])}}}}for(var ab in ag){if(ag[ab]!=Object.prototype[ab]&&ab.toLowerCase()!="movie"){e(Z,ab,ag[ab])}}aa.parentNode.replaceChild(Z,aa);X=Z}}return X}function e(Z,X,Y){var aa=C("param");aa.setAttribute("name",X);aa.setAttribute("value",Y);Z.appendChild(aa)}function y(Y){var X=c(Y);if(X&&X.nodeName=="OBJECT"){if(M.ie&&M.win){X.style.display="none";(function(){if(X.readyState==4){b(Y)}else{setTimeout(arguments.callee,10)}})()}else{X.parentNode.removeChild(X)}}}function b(Z){var Y=c(Z);if(Y){for(var X in Y){if(typeof Y[X]=="function"){Y[X]=null}}Y.parentNode.removeChild(Y)}}function c(Z){var X=null;try{X=j.getElementById(Z)}catch(Y){}return X}function C(X){return j.createElement(X)}function i(Z,X,Y){Z.attachEvent(X,Y);I[I.length]=[Z,X,Y]}function F(Z){var Y=M.pv,X=Z.split(".");X[0]=parseInt(X[0],10);X[1]=parseInt(X[1],10)||0;X[2]=parseInt(X[2],10)||0;return(Y[0]>X[0]||(Y[0]==X[0]&&Y[1]>X[1])||(Y[0]==X[0]&&Y[1]==X[1]&&Y[2]>=X[2]))?true:false}function v(ac,Y,ad,ab){if(M.ie&&M.mac){return}var aa=j.getElementsByTagName("head")[0];if(!aa){return}var X=(ad&&typeof ad=="string")?ad:"screen";if(ab){n=null;G=null}if(!n||G!=X){var Z=C("style");Z.setAttribute("type","text/css");Z.setAttribute("media",X);n=aa.appendChild(Z);if(M.ie&&M.win&&typeof j.styleSheets!=D&&j.styleSheets.length>0){n=j.styleSheets[j.styleSheets.length-1]}G=X}if(M.ie&&M.win){if(n&&typeof n.addRule==r){n.addRule(ac,Y)}}else{if(n&&typeof j.createTextNode!=D){n.appendChild(j.createTextNode(ac+" {"+Y+"}"))}}}function w(Z,X){if(!m){return}var Y=X?"visible":"hidden";if(J&&c(Z)){c(Z).style.visibility=Y}else{v("#"+Z,"visibility:"+Y)}}function L(Y){var Z=/[\\\"<>\.;]/;var X=Z.exec(Y)!=null;return X&&typeof encodeURIComponent!=D?encodeURIComponent(Y):Y}var d=function(){if(M.ie&&M.win){window.attachEvent("onunload",function(){var ac=I.length;for(var ab=0;ab<ac;ab++){I[ab][0].detachEvent(I[ab][1],I[ab][2])}var Z=N.length;for(var aa=0;aa<Z;aa++){y(N[aa])}for(var Y in M){M[Y]=null}M=null;for(var X in swfobject){swfobject[X]=null}swfobject=null})}}();return{registerObject:function(ab,X,aa,Z){if(M.w3&&ab&&X){var Y={};Y.id=ab;Y.swfVersion=X;Y.expressInstall=aa;Y.callbackFn=Z;o[o.length]=Y;w(ab,false)}else{if(Z){Z({success:false,id:ab})}}},getObjectById:function(X){if(M.w3){return z(X)}},embedSWF:function(ab,ah,ae,ag,Y,aa,Z,ad,af,ac){var X={success:false,id:ah};if(M.w3&&!(M.wk&&M.wk<312)&&ab&&ah&&ae&&ag&&Y){w(ah,false);K(function(){ae+="";ag+="";var aj={};if(af&&typeof af===r){for(var al in af){aj[al]=af[al]}}aj.data=ab;aj.width=ae;aj.height=ag;var am={};if(ad&&typeof ad===r){for(var ak in ad){am[ak]=ad[ak]}}if(Z&&typeof Z===r){for(var ai in Z){if(typeof am.flashvars!=D){am.flashvars+="&"+ai+"="+Z[ai]}else{am.flashvars=ai+"="+Z[ai]}}}if(F(Y)){var an=u(aj,am,ah);if(aj.id==ah){w(ah,true)}X.success=true;X.ref=an}else{if(aa&&A()){aj.data=aa;P(aj,am,ah,ac);return}else{w(ah,true)}}if(ac){ac(X)}})}else{if(ac){ac(X)}}},switchOffAutoHideShow:function(){m=false},ua:M,getFlashPlayerVersion:function(){return{major:M.pv[0],minor:M.pv[1],release:M.pv[2]}},hasFlashPlayerVersion:F,createSWF:function(Z,Y,X){if(M.w3){return u(Z,Y,X)}else{return undefined}},showExpressInstall:function(Z,aa,X,Y){if(M.w3&&A()){P(Z,aa,X,Y)}},removeSWF:function(X){if(M.w3){y(X)}},createCSS:function(aa,Z,Y,X){if(M.w3){v(aa,Z,Y,X)}},addDomLoadEvent:K,addLoadEvent:s,getQueryParamValue:function(aa){var Z=j.location.search||j.location.hash;if(Z){if(/\?/.test(Z)){Z=Z.split("?")[1]}if(aa==null){return L(Z)}var Y=Z.split("&");for(var X=0;X<Y.length;X++){if(Y[X].substring(0,Y[X].indexOf("="))==aa){return L(Y[X].substring((Y[X].indexOf("=")+1)))}}}return""},expressInstallCallback:function(){if(a){var X=c(R);if(X&&l){X.parentNode.replaceChild(l,X);if(Q){w(Q,true);if(M.ie&&M.win){l.style.display="block"}}if(E){E(B)}}a=false}}}}();
var myInfo = { infoID:'0', userid:0, loginstate:'', cityid:172, dispCityid:172, curDiscateid:36, rootCateName:'sale', currentCateName:'shouji', TopRoleMaxCount:0, CurrentPostCount:0, viewdata:{ baohushouji:''} };
(function(a) {
    a.debug = false;
    a.log = function() {};
    a.GA = {
        s1: function(c, d) {
            try {
                typeof _gaq != "undefined" && _gaq.push(["pageTracker._trackEvent", "58-post", myInfo.rootCateName + "-" + myInfo.currentCateName + c, d])
            } catch(e) {}
        }
    };
    a.j = {
        Cookie: {
            get: function(c) {
                c = document.cookie.match(new RegExp(c + "=([^&;]+)"));
                if (c != null) return decodeURI(c[1]);
                return ""
            },
            setcookie: function(c, d) {
                a.j.Cookie.set(c, d)
            },
            set: function(c, d, e, f, g) {
                c = c + "=" + escape(d) + ";";
                if (e && e != "") c = c + "domain=" + e + ";";
                if (f && f > 0) {
                    e = new Date;
                    e.setTime(e.getTime() + 864E5 * f);
                    c = c + "expires=" + e.toGMTString() + ";"
                }
                if (g && g != "") c = c + "path=" + g + ";";
                document.cookie = c
            },
            del: function(c) {
                a.j.Cookie.set(c, " ", "", -1, "/")
            }
        },
        AjaxProvider: function(c, d) {
            a.post(c, {},
                function(e) {
                    d(e)
                },
                "html")
        },
        callajax: function(c, d, e) {
            var f = "/ajax?";
            c = "&action=" + c + "&";
            c += d;
            c += "&rand=" + new Date;
            f += c;
            a.j.AjaxProvider(f, e)
        },
        getdicvalue: function(c, d, e) {
            try {
                for (var f = 0; f < d.length; f++) {
                    var g = d[f].split(e);
                    if (c.toLowerCase() == g[0].toLowerCase()) {
                        var h = g[1];
                        if (h) return h
                    }
                }
                return ""
            } catch(j) {
                return ""
            }
        },
        getTopLeft: function(c) {
            obj = {};
            c = document.getElementById(objectId);
            oLeft = c.offsetLeft;
            for (oTop = c.offsetTop; c.offsetParent != null;) {
                oParent = c.offsetParent;
                oLeft += oParent.offsetLeft;
                oTop += oParent.offsetTop;
                c = oParent
            }
            obj.top = oTop;
            obj.left = oLeft;
            return obj
        },
        scrollToElement: function(c) {
            try {
                var d = a.j.getTopLeft(c);
                parent ? parent.window.scrollTo(d.left, d.top) : window.scrollTo(d.left, d.top)
            } catch(e) {
                window.scrollTo(0, 0)
            }
        },
        geturlparam: function(c, d) {
            var e = new RegExp("(^|&)" + d + "=([^&]*)(&|$)");
            e = c.substr(c.indexOf("?") + 1).match(e);
            if (e != null) return unescape(e[2]);
            return null
        },
        initEffectiveDate: function() {
            var c = a("#hidEffectiveDate"),
                d = a("#EffectiveDate");
            if (d && c && c.val() != "") if (c.val() == "7" || c.val() == "30" || c.val() == "100" || c.val() == "365") d.val(c.val())
        },
        appendvalue: function() {
            var c, d, e, f, g, h, j = a("#StartTime"),
                k = a("#StartStation"),
                l = a("#EndStation"),
                m = a("#Num"),
                n = a("#count"),
                p = a("#ObjectType");
            if (j) c = j.val();
            if (k) {
                d = k.val();
                if (k.attr("Except") == d) d = ""
            }
            if (l) {
                e = l.val();
                if (l.attr("Except") == e) e = ""
            }
            if (m) f = m.val();
            if (n) g = n.val();
            if (p) h = a("#ObjectType").attr("disabled") == true ? "\u7c7b\u578b\u4e0d\u9650": a("#ObjectType option:selected").text();
            a.j.appendtitle(c, d, e, f, g, h)
        },
        appendtitle: function(c, d, e, f, g, h) {
            var j = "";
            if (d != "" && d != null) j = d + "-";
            if (e != "" && e != null) j += e + " ";
            if (f != "" && f != null) j += f + " ";
            if (h != "" && h != null) j += h;
            if (g != "" && g != null) j += g + "\u5f20";
            if (c != "" && c != null) j += " \u53d1\u8f66\u65e5\u671f:" + c;
            a("#Title").val(j)
        },
        dyniframesize: function(c) {
            c = document.getElementById(c);
            c.height = "10px";
            if (document.getElementById) if (c && !window.opera) if (c.contentDocument && c.contentDocument.body.offsetHeight) c.height = c.contentDocument.body.offsetHeight;
            else if (c.Document && c.Document.body.scrollHeight) c.height = c.Document.body.scrollHeight
        },
        getCityDataFromXml: function(c, d) {
            a.ajax({
                url: "/config/City.xml",
                type: "get",
                dataType: "xml",
                timeout: 5E3,
                cache: false,
                error: function() {},
                success: function(e) {
                    var f = [];
                    a(e).find("province").each(function() {
                        var g = [];
                        g.push(a(this).attr("value"));
                        a(this).find("city").each(function() {
                            g.push(a(this).attr("value"))
                        });
                        f.push(g)
                    });
                    a(c).data("CityData", f);
                    d()
                }
            })
        },
        initTagCheck: function(c) {
            var d = 2;
            if (c) if (!isNaN(c)) if (parseInt(c) > 0) d = parseInt(c);
            a(':checkbox[name="Tag"]').formValidator({
                tipid: "infotag_Tip",
                onfocus: ""
            }).functionValidator({
                    fun: function() {
                        return a(':checkbox[name="Tag"]:checked').length <= d
                    },
                    onerror: "\u6700\u591a\u53ea\u80fd\u9009\u62e9" + d + "\u4e2a\u6807\u7b7e"
                });
            a(':checkbox[name="Tag"]').bind("click",
                function() {
                    a(':checkbox[name="Tag"]:checked').length <= d ? a.formValidator.setTipState(null, "onCorrect", " ", "infotag_Tip") : a.formValidator.setTipState(null, "onError", "\u6700\u591a\u53ea\u80fd\u9009\u62e9" + d + "\u4e2a\u6807\u7b7e", "infotag_Tip")
                })
        },
        CalClickAfter: function(c) {
            if (a(c).data("hasEvent") != 1) {
                a(c).data("hasEvent", 1);
                a("#GGS_cal_days").bind("click",
                    function() {
                        c.focus()
                    })
            }
        },
        isTextBox: function(c) {
            if (c == null) return false;
            var d = a(c).get(0).id;
            if (!a(c).get(0).tagName) return false;
            c = a(c).get(0).tagName.toUpperCase();
            if (a("#" + d + ":text").length == 1) return true;
            if (c == "TEXTAREA") return true;
            return false
        },
        getTextBoxJoinValue: function(c) {
            var d = "";
            try {
                var e = [],
                    f = a(":text:visible");
                f.each(function(h) {
                    if (f.get(h).id != "Title" && f.get(h).id != "Phone" && f.get(h).id != "codeText" && f.get(h).id != "IM") {
                        h = a.trim(f.get(h).value);
                        if (h.length > 1) {
                            var j = false;
                            if (isNaN(h)) j = true;
                            else if (h.length >= 11) j = true;
                            if (j) e[e.length] = h
                        }
                    }
                });
                d = e.join(c)
            } catch(g) {}
            return d
        },
        createFieldForTextJoinValue: function(c) {
            a("#hiddenTextBoxJoinValue").length == 0 && a(c).append('<input type="hidden" id="hiddenTextBoxJoinValue" name="hiddenTextBoxJoinValue" value="" />');
            c = a.j.getTextBoxJoinValue(":");
            a("#hiddenTextBoxJoinValue").val(c)
        },
        initContentTip: function(c) {
            a.j.initTip("Content", c)
        },
        initTip: function(c, d) {
            var e = a("#" + c);
            if (e.length != 0) {
                e.val() == "" && e.val(d).addClass("gray");
                e.bind("focus",
                    function() {
                        e.removeClass("gray");
                        e.val() == d && e.val("")
                    }).bind("blur",
                    function() {
                        if (e.val() == "") {
                            e.val(d);
                            e.addClass("gray")
                        } else e.removeClass("gray")
                    })
            }
        },
        getFullTextSearchVal: function(c) {
            var d = a("#" + c);
            if (d.length == 0) return "";
            if (d.attr("nameid") == undefined) if (d.attr("type") && d.attr("type").toLowerCase() != "hidden") if (a("#" + c + ":hidden").length > 0) return "";
            c = d.get(0);
            if (a.j.isTextBox(c)) return a(c).val();
            d = a(c).get(0).tagName.toUpperCase();
            if (d == "SELECT") {
                if (c.options[c.selectedIndex].value) {
                    d = a(c.options[c.selectedIndex]).attr("ci");
                    if (d != undefined) if (d != "0") return "";
                    d = a(c.options[c.selectedIndex]).attr("alias");
                    if (d != undefined) d += "|";
                    else d = "";
                    return d + c.options[c.selectedIndex].text
                }
                return ""
            }
            if (d == "INPUT") {
                var e = a(c).attr("type").toUpperCase();
                if (e == "CHECKBOX") if (c.checked) {
                    d = a(c).attr("alias");
                    if (d != undefined) d += "|";
                    else d = "";
                    var f = a(c).next("label");
                    if (f.length > 0) return d + a(f).html();
                    f = a(c).next("span");
                    if (f.length > 0) return d + a(f).html()
                }
                if (e == "RADIO") if (c.checked) {
                    d = a(c).attr("alias");
                    if (d != undefined) d += "|";
                    else d = "";
                    f = a(c).next("span");
                    if (f.length > 0) return d + a(f).html()
                }
                if (e == "HIDDEN") return c.value
            }
            return ""
        },
        freePhone_IsRunning: false,
        asynPhone: function(c, d, e, f) {
            if (____json4fe.catentry[0].dispid == "5") return a.yinsi.init(c, d, e, f);
            a.ajax({
                url: "/ajax/?action=getcalldivert&userid=" + c,
                type: "GET",
                timeout: 3E3,
                dataType: "json",
                success: function(g) {
                    a.j.initPhone(d, g.ehPhone, e, g.rPhone, f, g.CallState)
                }
            })
        },
        initPhone: function(c, d, e, f, g, h) {
            if (! (g != "" && d == "")) {
                if (d == "") if (a.j.freePhone_IsRunning) {
                    a.callDivert.freeDivert_init(g != "");
                    return
                }
                g = d == "" ? '<a href="http://my.58.com/calltransfermanagement/?menu=21" target="_blank" style="font-size:12px;" onclick="$.GA.s1(\'click\', \'call-setting-link\');">\u8bbe\u7f6e\u7535\u8bdd\u8f6c\u63a5\uff0c\u4fdd\u62a4\u624b\u673a\u53f7\u7801\u4e0d\u88ab\u516c\u5f00</a>': '<input type="checkbox" id="cbxUseEPhone" name="cbxUseEPhone" value="1" />\u4f7f\u752858\u547c\u8f6c';
                if (d != "") h == "1" || h == "" || (g += h == 5 ? ' (\u5df2\u6682\u505c, <a href="http://my.58.com/calltransfermanagement/?menu=21" target="_blank">\u9a6c\u4e0a\u5f00\u542f</a>)': ' (\u5df2\u5230\u671f, <a href="http://my.58.com/calltransfermanagement/?menu=21" target="_blank">\u9a6c\u4e0a\u7eed\u8d39</a>)');
                a("#Phone").after("&nbsp;" + g);
                if (c == "0") {
                    if (d != "") {
                        a("#cbxUseEPhone").get(0).checked = true;
                        a("#Phone").val(d).attr("readonly", "true");
                        a("#Phone").attr("style", "color:#666")
                    }
                } else if (d == e) {
                    a("#cbxUseEPhone").get(0).checked = true;
                    a("#Phone").val(d).attr("readonly", "true");
                    a("#Phone").attr("style", "color:#666")
                }
                a("#cbxUseEPhone").bind("click",
                    function() {
                        if (this.checked) {
                            a("#Phone").val(d).attr("readonly", "true");
                            a("#Phone").attr("style", "color:#666")
                        } else {
                            a("#Phone").val(f).removeAttr("readonly");
                            a("#Phone").removeAttr("style")
                        }
                        a("#Phone").blur()
                    });
                if (h != "1" && d != "") {
                    if (c == "0") a("#cbxUseEPhone").get(0).click();
                    else d == e && a("#Phone").val(f).removeAttr("readonly");
                    a("#cbxUseEPhone").attr("disabled", "true")
                }
            }
        }
    };
    a.c = {
        common: {
            isMobilePost: function() {
                var c = false;
                if ("ext" in ____json4fe) c = ____json4fe.ext.sys == "mobilepost";
                return c
            },
            dodot_sumbit: function(c) {
                if (c.keyCode == 13) {
                    c.keyCode = 0;
                    return false
                }
            },
            addOptionsToSelect: function(c, d, e) {
                var f = document.createElement("option");
                f.value = d;
                f.text = e;
                a("#" + c).get(0).options.add(f)
            },
            setSelectedOption: function(c, d, e) {
                a("#" + c + " option").each(function(f, g) {
                    var h = false;
                    if (d != null && g.value == d) h = true;
                    else if (e != null) if (g.text == e) h = true;
                    if (h) {
                        a(g).attr("selected", "selected");
                        return false
                    }
                })
            },
            isIE6: function() {
                if (a.browser.msie) return a.browser.version == 6;
                return false
            },
            isIeVersion: function(c) {
                if (a.browser.msie) return a.browser.version == c;
                return false
            },
            stripHtml: function(c) {
                c = c || "";
                c = c.replace(new RegExp("<script[^>.]*>[sS]*?<\/script>", "gim"), " ");
                c = c.replace(new RegExp("<style[^>.]*>[sS]*?</style>", "gim"), " ");
                c = c.replace(new RegExp("<(.| )+?>", "gim"), " ");
                c = c.replace(/</, "&lt;");
                return c = c.replace(/>/, "&gt;")
            },
            set_focus_height: function() {
                var c = a(this).attr("focus_height");
                if (c) {
                    a(this).data("height") || a(this).data("height", a(this).height());
                    a(this).height(parseInt(c))
                }
            },
            set_blur_height: function() {
                var c = a(this).data("height");
                c && c != a(this).height() && a(this).height(c)
            },
            getRadioIndex: function(c) {
                var d = -1;
                a(':radio[name="' + c + '"]').each(function(e, f) {
                    if (f.checked) {
                        d = e;
                        return false
                    }
                });
                return d
            },
            getSelectedText: function(c) {
                var d = null;
                c = a("#" + c);
                if (c.length > 0) d = c.get(0).options[c.get(0).selectedIndex].text;
                return d
            },
            inArray: function(c, d) {
                var e = false;
                a(c).each(function(f, g) {
                    if (g == d) {
                        e = true;
                        return false
                    }
                });
                return e
            },
            redraw: function(c, d) {
                c >= d.length || a(d[c]).each(function(e, f) {
                    a(f.s).each(function(g, h) {
                        a(":text#" + h).removeAttr("disabled");
                        a("#" + h).show()
                    });
                    a(f.h).each(function(g, h) {
                        a(":text#" + h).attr("disabled", "disabled");
                        a("#" + h).hide()
                    })
                })
            },
            getExt: function(c) {
                var d = null;
                if (____json4fe.ext) d = ____json4fe.ext[c];
                return d
            }
        },
        xiaoqu: {
            getXiaoquInfo_callback: null,
            getXiaoquInfo: function(c, d, e) {
                if (arguments.length == 3) a.c.xiaoqu.getXiaoquInfo_callback = e;
                var f = "cityid=" + c + "&xq=" + encodeURIComponent(d);
                a.j.callajax("getxiaoquinfo", f, a.c.xiaoqu.setValue)
            },
            setValue: function(c) {
                var d = a("#xiaoqu"),
                    e = a("#hidxiaoqu");
                if (c == "") { (new RegExp(/^\d$/)).test(d.val()) && d.val("@" + d.val());
                    e.val(d.val())
                } else {
                    d = {
                        index: 4
                    };
                    var f = c.split("$");
                    c = a.c.xiaoqu.getXiaoquID(f);
                    e = a.c.xiaoqu.hasGjDt(f);
                    var g = a.c.xiaoqu.getDtxl(f),
                        h = a.c.xiaoqu.getDtzd(f, 1, d),
                        j = a.c.xiaoqu.getDtzd(f, 0, d),
                        k = a.c.xiaoqu.getBusline(f),
                        l = a.c.xiaoqu.getBusStation(f, 1);
                    f = a.c.xiaoqu.getBusStation(f, 0);
                    d = d.index.toString();
                    if (d == "4") d = "";
                    if (a.debug) {
                        console.info("\u5c0f\u533aid:" + c);
                        console.info("\u662f\u5426\u6709\u516c\u4ea4\u5730\u94c1:" + e);
                        console.info("\u5730\u94c1\u7ebf\u8def:" + g);
                        console.info("\u5730\u94c1\u7ad9\u70b9\u6700\u4f18\u8ddd\u79bb:" + h);
                        console.info("\u5730\u94c1\u7ad9\u70b9\u6700\u4f18ID:" + j);
                        console.info("\u516c\u4ea4\u7ebf\u8def:" + k);
                        console.info("\u516c\u4ea4\u7ad9\u8ddd\u79bb:" + l);
                        console.info("\u516c\u4ea4\u7ad9id:" + f);
                        console.info("\u6700\u4f73\u7ec4\u7d22\u5f15:" + d)
                    }
                    if (d == "") {
                        e = a.c.xiaoqu.clearDitieValue(e);
                        g = "";
                        a.debug && console.warn("\u5728\u89c4\u5b9a\u8ddd\u79bb\u5185\u6ca1\u6709\u627e\u5230\u5730\u94c1\u7ad9\uff0c\u5df2\u91cd\u7f6e\u53c2\u6570\uff1a\u662f\u5426\u6709\u516c\u4ea4\u5730\u94c1(" + e + ")\u3001\u5730\u94c1\u7ebf\u8def(" + g + ")")
                    }
                    a.c.xiaoqu.setValue_call([c, e, g, h, j, k, l, f, d]);
                    a.c.xiaoqu.save_xiaoqu_toCookie()
                }
                try {
                    a.c.xiaoqu.getXiaoquInfo_callback != null && a.c.xiaoqu.getXiaoquInfo_callback()
                } catch(m) {}
                a.debug || a.formValidator.subform("aspnetForm", "fabu")
            },
            save_xiaoqu_toCookie: function() {
                try {
                    typeof RememberXQ != "undefined" && RememberXQ()
                } catch(c) {}
            },
            setValue_call: function(c) {
                var d = ["hidxiaoqu", "xianluzhoubian", "ditiexian", "stationdistance", "ditiezhan", "gongjiaoxian", "busdistance", "gongjiaozhan", "distancetime"];
                a(c).each(function(e, f) {
                    a("#" + d[e]).val(f)
                })
            },
            clearDitieValue: function(c) {
                var d = c.split("|");
                a(d).each(function(e, f) {
                    if (f == 2) {
                        d.splice(e, 1);
                        return false
                    }
                });
                return c = d.join("|")
            },
            getXiaoquID: function(c) {
                return a.c.xiaoqu.getItemValue(c, "DicID_")
            },
            hasGjDt: function(c) {
                var d = [];
                a.c.xiaoqu.getItemValue(c, "busstation_") && d.push(1);
                a.c.xiaoqu.getItemValue(c, "substation_") && d.push(2);
                return d.join("|")
            },
            getDtxl: function(c) {
                return a.c.xiaoqu.getItemValue(c, "subline_")
            },
            getDtzd: function(c, d, e) {
                var f = "",
                    g = [];
                if (c = a.c.xiaoqu.getItemValue(c, "substation_")) {
                    e = a.c.xiaoqu.getBestGroup(c, e);
                    e.length > 0 && a(e).each(function(h, j) {
                        var k = j.split("-");
                        g.push(k[d])
                    })
                }
                return f = g.join("|")
            },
            getBusline: function(c) {
                return a.c.xiaoqu.getItemValue(c, "busline_")
            },
            getBusStation: function(c, d) {
                var e = [],
                    f = a.c.xiaoqu.getItemValue(c, "busstation_").split("|");
                a(f).each(function(g, h) {
                    var j = h.split("-");
                    j.length == 2 && e.push(j[d])
                });
                return e.join("|")
            },
            getItemValue: function(c, d) {
                var e = "";
                a(c).each(function(f, g) {
                    if (g.indexOf(d) != -1) {
                        var h = g.split("_");
                        if (h.length > 1) {
                            e = h[1];
                            return false
                        }
                    }
                });
                return e
            },
            getBestGroup: function(c, d) {
                var e = [[], [], [], []],
                    f = c.split("|");
                a(f).each(function(g, h) {
                    var j = h.split("-");
                    if (j.length == 2) {
                        j = parseInt(j[1]) / 70;
                        if (j <= 10) e[0].push(h);
                        else if (j <= 20) e[1].push(h);
                        else j <= 30 ? e[2].push(h) : e[3].push(h)
                    }
                });
                if (a.debug) {
                    console.info("\u7b2c\u4e00\u7ec4\uff1a" + e[0].join("|"));
                    console.info("\u7b2c\u4e8c\u7ec4\uff1a" + e[1].join("|"));
                    console.info("\u7b2c\u4e09\u7ec4\uff1a" + e[2].join("|"));
                    console.info("\u7b2c\u56db\u7ec4\uff1a" + e[3].join("|"))
                }
                if (e[0].length > 0) {
                    d.index = 1;
                    return e[0]
                }
                if (e[1].length > 0) {
                    d.index = 2;
                    return e[1]
                }
                if (e[2].length > 0) {
                    d.index = 3;
                    return e[2]
                }
                d.index = 4;
                return []
            },
            getLineValue: function(c, d) {
                var e = "city=" + c + "&";
                e += "xq=" + escape(d);
                a.j.callajax("line", e, a.c.xiaoqu.setLineValue)
            },
            setLineValue: function(c) {
                var d = a("#gongjiaoxian"),
                    e = a("#gongjiaozhan"),
                    f = a("#ditiexian"),
                    g = a("#ditiezhan"),
                    h = a("#daxue"),
                    j = a("#hidxiaoqu"),
                    k = a("#xiaoqu");
                if (c == "") {
                    if (j) { (new RegExp(/^\d$/)).test(k.val()) && k.val("@" + k.val());
                        j.val(k.val())
                    }
                } else {
                    c = c.split("$");
                    d && d.val(a.j.getdicvalue("busline", c, "_"));
                    e && e.val(a.j.getdicvalue("busstation", c, "_"));
                    f && f.val(a.j.getdicvalue("subline", c, "_"));
                    g && g.val(a.j.getdicvalue("substation", c, "_"));
                    h && h.val(a.j.getdicvalue("university", c, "_"));
                    j && j.val(a.j.getdicvalue("DicID", c, "_"))
                }
                a.formValidator.subform("aspnetForm", "fabu")
            },
            getxiaoquname: function() {
                var c = a("#hidxiaoqu").val();
                /^\d+$/.test(c) ? a.j.callajax("line1", "id=" + c,
                    function(d) {
                        a("#xiaoqu").val(d)
                    }) : a("#xiaoqu").val(c)
            }
        },
        Error: {
            errorMessage: {
                POSTTOOMORE: '<div class="sorry" id="tishi"><p>{MESSAGE}</p></div>',
                BLACKUSER: '<div class="sorry" id="tishi"><p><span class="red"><img src="http://pic2.58.com/images/5_0/ok4848.gif" align="absmiddle" /></span></p><p>{MESSAGE}<br /></div>',
                SEALEDUSER: '<div class="sorry" id="tishi"><p><span class="red"><img src="http://pic2.58.com/images/5_0/ok4848.gif" align="absmiddle" /></span></p><p>{MESSAGE}</p><br /></div>',
                INFOREPEATE: '<div class="xiangsi"><p class="bt"><span class="red"><img src="http://pic2.58.com/images/5_0/ok4848.gif" align="absmiddle" /></span></p><p>{MESSAGE}</p><br /></div>',
                INFOILLEGAL: '<div class="sorry" id="tishi"><p class="bt"><span class="red"><img src="http://pic2.58.com/images/5_0/ok4848.gif" align="absmiddle" /></span></p><p>{MESSAGE}</p><br /></div>',
                INFOGUANSHUI: '<div class="sorry" id="tishi"><p class="bt"><span class="red"><img src="http://pic2.58.com/images/5_0/ok4848.gif" align="absmiddle" /></span></p><p>{MESSAGE}</p><br /></div>',
                INFOSCORE: '<div class="sorry1" id="tishi"><p class="bt"></p><p>{MESSAGE}</p><br /><p><input name="" type="button" value="\u8fd4\u56de\u4fee\u6539" onclick="reclose()"/><input name="" type="button" value="\u7ee7\u7eed\u53d1\u5e03" onclick="fabu()"/></p></div>',
                FORBIDDEN: '<div class="sorry1" id="tishi"><p class="bt"></p><p>{MESSAGE}</p><br /><p align=center style="margin-bottom:10px;"><input type=\'button\' value=\'\u77e5\u9053\u4e86\' onclick=\'window.location.href="http://www.58.com"\'></p></div>',
                EX: '<div class="sorry" id="tishi"><p class="bt"><span class="red"><img src="http://pic2.58.com/images/5_0/ok4848.gif" align="absmiddle" />\u3000\u53d1\u5e03\u5931\u8d25\uff01</span></p><p>\u7cfb\u7edf\u5f02\u5e38\u3002\u8bf7\u4e0e\u7ba1\u7406\u5458\u8054\u7cfb\u3002</p><br /><p><input name="" type="button" value="\u786e\u5b9a" onclick="turnPage()"/></p></div>'
            },
            S_Message: function(c) {
                var d = c.t;
                if (c.Order == 1) if (d == "unlogin") setbg("\u7528\u6237\u767b\u5f55", 410, 250, "http://my.58.com/simlogin/?type=loginclose", "false");
                else c.cb == 0 ? a.c.Error.initMessage(c) : a.c.Error.initMessage1(c);
                else if (document.all) window.onload = function() {
                    a.c.Error.initMessage(c)
                };
                else a.c.Error.initMessage(c)
            },
            initMessage: function(c) {
                window.scrollTo(0, 0);
                if (c.t == "UNERROR") {
                    var d = "";
                    if (c != null) if (c.msg != null) d = typeof c.msg == "object" ? c.msg.join("<br/>") : c.msg;
                    a.c.msg.show({
                        msg: [d]
                    })
                } else {
                    d = a.c.Error.errorMessage[c.t];
                    if (d == null) alert("initMessage : A is null.");
                    else {
                        var e = "450px",
                            f = "400px",
                            g = [];
                        switch (c.t) {
                            case "BLACKUSER":
                                break;
                            case "SEALEDUSER":
                                g.push("<br>\u4eb2\u7231\u7684<b>{0}</b>\uff0c\u60a8\u7684\u8d26\u6237\u5df2\u88ab\u51bb\u7ed3\uff08<a href='http://about.58.com/89.html#d'>\u67e5\u770b\u539f\u56e0</a>\uff09\u3002");
                                g.push("<p align=center><input type='button' value='\u77e5\u9053\u4e86' onclick='window.location.href=\"http://my.58.com\"'></p>");
                                break;
                            case "INFOREPEATE":
                                f = "350px";
                                break;
                            case "INFOILLEGAL":
                                break;
                            case "INFOGUANSHUI":
                                e = "400px";
                                f = "260px";
                                g.push("<br>\u4eb2\u7231\u7684<b>{0}</b>\uff0c\u60a8\u53d1\u5e03\u4fe1\u606f\u592a\u8fc7\u9891\u7e41\u4e86\uff0c\u8bf7\u7a0d\u5019\u518d\u8bd5!<br><br>");
                                g.push("<p align=center><input type='button' value='\u77e5\u9053\u4e86' onclick='window.location.href=\"http://my.58.com\"'></p>");
                                break;
                            case "FORBIDDEN":
                                f = "280px";
                                break
                        }
                        if (c.user != null) c.msg = g.join("").replace("{0}", c.user.uname).replace("{1}", c.user.ucr).replace("{2}", c.user.curcate).replace("{3}", c.user.maxpostcount);
                        if (c.t != "INFOSCORE") d = d.replace(/{MESSAGE}/g, c.msg);
                        a.c.Layer.setting.MsgTitle = '<p class="hh">\u7cfb\u7edf\u63d0\u793a\u4fe1\u606f</p>';
                        a.c.Layer.setting.height = f;
                        a.c.Layer.setting.width = e;
                        a.c.Layer.setting.html = d;
                        a.c.Layer.event()
                    }
                }
            },
            initMessage1: function(c) {
                c = c.msg;
                var d = [];
                d.push("<strong>\u53d1\u5e03\u5931\u8d25</strong><br />");
                for (var e = 0; e < c.length; e++) d.push(e + 1 + "\u3001" + c[e] + "<br/>");
                d.push('<a href="javascript:void(0);" onclick="$(\'#toperro\').slideUp();" title="\u5173\u95ed" class="close1">&times;</a>');
                a.c.Error.setError(d.join(""))
            },
            setError: function(c) {
                var d = a("#toperro");
                d.addClass("sc");
                d.css("display", "");
                d.html(c);
                a.j.scrollToElement(d.get(0));
                flagSubmit = false;
                a.formValidator.subfalse("aspnetForm", "fabu")
            },
            showError: function(c) {
                alert(c);
                flagSubmit = false;
                a.formValidator.subfalse("aspnetForm", "fabu")
            },
            showVipError: function(c) {
                var d = a("#toperro");
                d.addClass("sc");
                d.show().html(c);
                a("#fabu").attr("disabled", "disabled")
            }
        },
        Layer: {
            setting: {
                MsgTitle: "",
                height: 500,
                width: 500,
                html: "",
                sBox: '<div id=\'ab2\' class=\'boxout\'><div id="divTm" class="tm"></div><div id="divBoxin" class="boxin">{0}<div id="dialogBoxContent"></div></div></div></div>'
            },
            event: function() {
                this.init();
                a("#body_pr").length > 0 && a("#body_pr").css("display", "block");
                a("#dialogBoxContent").html(this.setting.html);
                a("#divTm")[0].style.height = this.setting.height;
                a("#ab_hhh").css("display", "block")
            },
            init: function() {
                this.LayerDiv();
                var c;
                if (a("#ab_hhh").length <= 0) {
                    c = document.createElement("div");
                    c.id = "ab_hhh";
                    document.body.appendChild(c)
                } else c = a("#ab_hhh")[0];
                c.innerHTML = this.setting.sBox.replace("{0}", this.setting.MsgTitle);
                this.middle("ab_hhh")
            },
            LayerDiv: function() {
                var c;
                if (a("#body_pr").length <= 0) {
                    c = document.createElement("div");
                    c.id = "body_pr";
                    c.style.position = "absolute";
                    c.style.left = "0pt";
                    c.style.top = "0pt";
                    c.style.zIndex = 9999;
                    c.style.width = "100%";
                    c.style.backgroundColor = "rgb(0, 0, 0)";
                    c.style.height = document.body.scrollHeight + 100 + "px";
                    c.style.opacity = "0.3";
                    if (document.all) {
                        c.style.filter = "alpha(opacity=30)";
                        c.innerHTML = '<iframe src="about:blank" frameborder="0" style="position:absolute; visibility:inherit; top:0px; left:0px; width:100%; height:100%; z-index:9999; filter=\'progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=0)\';"></iframe>'
                    }
                    document.body.appendChild(c)
                }
            },
            middle: function(c) {
                c = document.getElementById(c);
                c.style.display = "";
                c.style.position = "absolute";
                c.style.width = "450px";
                c.style.zIndex = 99999;
                c.style.left = document.body.clientWidth / 2 - c.offsetWidth / 2 + "px";
                c.style.top = this.DialogLoc(c.offsetHeight) + "px"
            },
            DialogLoc: function(c) {
                var d = document.documentElement;
                if (window.innerWidth) {
                    var e = window.innerHeight;
                    d = window.pageYOffset
                } else {
                    e = d.offsetHeight;
                    d = d.scrollTop
                }
                return t_DiglogY = d + (e - c) / 2
            }
        },
        Disabletor: {
            paralist: [],
            initPara: function() {
                this.paralist = [];
                var c = a("#formTb").get(0);
                this.initPara1(c.getElementsByTagName("span"));
                this.initPara1(c.getElementsByTagName("tr"));
                this.initPara1(c.getElementsByTagName("input"));
                this.initPara1(c.getElementsByTagName("select"))
            },
            initPara1: function(c) {
                for (var d = 0; d < c.length; d++) if (a(c[d]).attr("id")) this.paralist[this.paralist.length] = a(c[d]).attr("id")
            },
            setdisable: function(c, d, e) {
                a.formValidator.removetip();
                this.initPara();
                for (var f = 0; f < c.length; f++) {
                    var g = c[f];
                    if (g.v == d) {
                        this.disable(this.paralist, g.a, g.t, e);
                        g.c();
                        break
                    }
                }
            },
            disable: function(c, d, e, f) {
                if (c.length == 0) {
                    this.initPara();
                    c = this.paralist
                }
                c = c;
                try {
                    var g = d.split("|");
                    for (d = 0; d < c.length; d++) {
                        var h = c[d],
                            j = a("#" + h).get(0);
                        if (j.type != "radio") if (j.type != "hidden") if (! (h == "trFlashUpload" || h == "Title" || h == "UserTag1" || h == "UserTag2" || h.indexOf("_Tip") != -1 || h == "tt")) {
                            var k = e == 0 ? 1 : 0;
                            jQuery.inArray(h, g) == -1 ? this.changeState(h, k, f) : this.changeState(h, e, f)
                        }
                    }
                } catch(l) {}
            },
            changeState: function(c, d, e) {
                var f = a("#" + c);
                c = a("#" + c).get(0);
                if (f) if (c.style) if (d == 0) {
                    f.css("display", "");
                    f.attr("disabled", false);
                    if (f.attr("type") == "text" && e == "0") if (f.attr("Except")) c.value = f.attr("Except") != "null" ? f.attr("Except") : "";
                    else if ("[|#|@]" == c.value) c.value = ""
                } else {
                    var g = true;
                    a(["tbxRegUid", "tbxRegEmail", "tbxRegPwd", "tbxLoginUid", "tbxLoginPwd"]).each(function(j, k) {
                        if (k == f.attr("id")) return g = false
                    });
                    if (g) {
                        f.css("display", "none");
                        if (c.type == "text" && e == "0") c.value = "[|#|@]";
                        else try {
                            if (c.name && c.name == "oldlevel") c.disabled = true
                        } catch(h) {}
                    }
                }
            },
            initSubValue: function(c, d, e, f, g) {
                c = a("#" + c);
                d = a("#" + d);
                var h = a("#" + e),
                    j = a("#" + f);
                if (!c || !d || !h || !j) return true;
                var k = d.attr("Except"),
                    l = h.attr("Except");
                try {
                    a.j.Cookie.setcookie(j.attr("Name"), "[#except#]")
                } catch(m) {}
                if (k && k == d.val() && d.css("display") != "none") j.val(d.val());
                else if (l && l == h.val() && h.css("display") != "none") j.val(h.val());
                else if (c.css("display") != "none") if (g == 0) {
                    document.getElementById(f).value = document.getElementById(e).value;
                    j.val(h.val())
                } else d.val() != "" && h.val() != "" && j.val(d.val() + "-" + h.val());
                else j.val(d.val())
            },
            initValue: function(c, d, e, f, g) {
                if (g != "0") {
                    c = a("#" + c);
                    d = a("#" + d);
                    e = a("#" + e);
                    if (c.val() != "") {
                        d.val(c.val().split("-")[0]);
                        f || c.val().split("-")[1] && e.val(c.val().split("-")[1])
                    }
                }
            }
        },
        Job: {
            isOpen: 0,
            submitType: 0,
            rootCateID: 0,
            currentCateID: 0,
            subzhaopininfo: function() {
                a.c.Job.submitType = 0;
                var c = a("#jieshouyouxiang"),
                    d = a("#Email");
                c && d && c.val(d.val());
                try {
                    a.c.Disabletor.initSubValue("minxinzi", "minxinzi", "maxxinzi", "hidprice", 1)
                } catch(e) {}
                c = a("#gsInfo").get(0);
                if (!c || !c.contentWindow || !c.contentWindow.getMode) {
                    alert("\u63d0\u4ea4\u51fa\u9519,\u516c\u53f8\u4fe1\u606f\u4e0d\u6b63\u786e");
                    return false
                }
                c = c.contentWindow;
                a.c.Job.isOpen == 0 ? c.subform(a.c.Job.subformZpRead, a.c.Job.subValue) : c.subform(a.c.Job.subformZpRead, a.c.Job.subformZpEdit);
                return false
            },
            subformZpRead: function() { / ^[1 - 9] + \d + $ / .test(a("#gongsi").val()) ? a.formValidator.subform("aspnetForm", "fabu") : alert("\u516c\u53f8\u4fe1\u606f\u4e0d\u6b63\u786e\uff0c\u8bf7\u4e0e\u5ba2\u670d\u8054\u7cfb\u3002")
            },
            subformZpEdit: function(c) {
                c = c;
                if (c.indexOf("error:") != -1) {
                    c = c.substr(c.indexOf("error:") + 6);
                    alert(c);
                    return false
                } else {
                    c = c.split("|");
                    a("#gongsi").val(c[0]);
                    if (!/^[1-9]+\d+$/.test(a("#gongsi").val())) {
                        alert("\u63d0\u4ea4\u51fa\u9519\uff0c\u4fe1\u606f\u4e0d\u6b63\u786e");
                        return false
                    }
                    c[1] && a("#hangyeyaoqiu").val(c[1]);
                    a.formValidator.subform("aspnetForm", "fabu")
                }
            },
            subqiuzhiinfo: function() {
                a.c.Job.submitType = 1;
                try {
                    a.c.Disabletor.initSubValue("minxinzi", "minxinzi", "maxxinzi", "hidprice", 1)
                } catch(c) {}
                var d = a("#gsInfo").get(0);
                if (!d || !d.contentWindow || !d.contentWindow.getMode) {
                    alert("\u63d0\u4ea4\u51fa\u9519\uff0c\u7b80\u5386\u586b\u5199\u4e0d\u6b63\u786e");
                    return false
                }
                d.contentWindow.parentValidate(a.c.Job.updateResume, a.c.Job.subValue);
                return false
            },
            getFindJobInfo: function() {
                var c = "",
                    d = "",
                    e = "0",
                    f = "";
                d = a("#xiaozhiwei");
                if (d.length > 0) c = d.get(0).options[d.get(0).selectedIndex].text;
                d = a("#Title").val();
                e = a("#maxxinzi").val();
                if (e == "\u9762\u8bae") e = "0";
                f = a("#Content").val();
                return [a.c.Job.rootCateID, a.c.Job.currentCateID, c, d, e, f]
            },
            updateResume: function() {
                var c = a("#gsInfo").get(0).contentWindow;
                a.c.Job.getFindJobInfo();
                c.sendLastedResume(function() {
                    try {
                        a("#Phone").val(c.GetPhone())
                    } catch(d) {}
                    a.formValidator.subform("aspnetForm", "fabu")
                })
            },
            subValue: function() {
                var c = a("#gsInfo").get(0).contentWindow;
                if (c.xmlHttp.readyState == 4) if (c.xmlHttp.status == 200) {
                    c = c.xmlHttp.responseText;
                    if (c.indexOf("error:") != -1) {
                        c = c.substr(c.indexOf("error:") + 6);
                        alert(c);
                        return false
                    } else {
                        c = c.split("|");
                        a("#gongsi").val(c[0]);
                        if (!/^[1-9]+\d+$/.test(a("#gongsi").val())) {
                            alert("\u63d0\u4ea4\u51fa\u9519\uff0c\u4fe1\u606f\u4e0d\u6b63\u786e");
                            return false
                        }
                        c[1] && a("#hangyeyaoqiu").val(c[1]);
                        a.c.Job.submitType == 1 ? a.c.Job.updateResume() : a.formValidator.subform("aspnetForm", "fabu")
                    }
                }
            }
        },
        vip: {
            clearSelectOptions: function(c) {
                c.options.length = 0
            }
        },
        sale: {
            gettag: function(c, d, e, f, g, h, j) {
                e = a("#" + e);
                var k = a("#" + g),
                    l = a("#" + h);
                if (e.val() == "") l.css("display", "none");
                else {
                    c = "cateid=" + c + "&";
                    c += "localid=" + d + "&";
                    c += "o=" + escape(e.val());
                    c += "&i=-1";
                    c += "&infoID=" + f;
                    a.j.callajax("tag", c,
                        function(m) {
                            k.html(m);
                            if (l) if (m.replace(" ", "") != "") {
                                l.css("display", "");
                                j && j()
                            } else l.css("display", "none")
                        })
                }
            }
        },
        fk: {
            k: "",
            i: function(c) {
                a.c.fk.k = c
            },
            s: function(c) {
                try {
                    var d = a.c.fk.g();
                    if (d == "" || d == undefined || d == null || d == "null") {
                        d = a.c.fk.k;
                        a.c.fk.o().pc(d)
                    }
                    a("#fcookie").val() == undefined ? a("#" + c).append('<input name="fcookie" id="fcookie" type="hidden" value="' + d + '"/>') : a("#fcookie").val(d)
                } catch(e) {}
            },
            g: function() {
                try {
                    return a.c.fk.o().gc()
                } catch(c) {}
                return ""
            },
            o: function() {
                try {
                    var c = document.getElementById("myFlash");
                    return navigator.appName.indexOf("Microsoft") != -1 ? c: a("#fkdiv embed").get(0)
                } catch(d) {}
                return null
            }
        }
    }
})(jQuery);

(function(a) {
    a.c.Uploader = {
        MaxNum: 8,
        SavedNum: 0,
        UploadPanel: null,
        PicUrls: [],
        isFlashVersion: true,
        actionUrl: "/upload",
        init: function(c) {
            if (typeof postpic_version != "undefined") a.c.Uploader.actionUrl = postpic_version == "java" ? "http://post.image.58.com/upload": "/upload";
            a(document).ready(function() {
                a.c.Uploader.lazy_init(c);
                setTimeout(function() {
                        a.c.Uploader.optimizeVip()
                    },
                    3E3)
            })
        },
        lazy_init: function(c) {
            if (arguments.length >= 1) a.c.Uploader.flashFrameLoaded_Method = c;
            a.c.Uploader.UploadPanel = a("#uploadPic");
            if (a.c.Uploader.UploadPanel.length != 0) {
                a(function() {
                    a.c.Uploader.loadFlashVersion()
                });
                var d = a.c.Uploader.UploadPanel.attr("maxNum");
                if (d != undefined) if (!isNaN(d)) a.c.Uploader.MaxNum = parseInt(d, 10);
                d = '<div style="display:none;" id="divframe">';
                for (var e = 0; e < a.c.Uploader.MaxNum; e++) d += '<iframe id="formSubmitPic_' + e + '" name="formSubmitPic_' + e + '"></iframe>';
                d += "</div>";
                a.c.Uploader.UploadPanel.append(d);
                a.c.Uploader.UploadPanel.append("<ul></ul>");
                d = '<div name="divUploader" class="cls_divUploader"><div class="loadbutton" style="display:none"><input id="fileUploadInput" name="fileUploadInput" type="file"></div>';
                d += '&nbsp;<span class="upload_ok">\u53ef\u4e0a\u4f20 <font color="red" name="limitNum">' + a.c.Uploader.MaxNum + "</font> \u5f20\u56fe\u7247\uff0c\u6bcf\u5f20\u6700\u59272M\uff0c\u652f\u6301jpg/gif/bmp/png\u683c\u5f0f</span>";
                d += '<span class="upload_error" style="display:none;"></span>';
                d += '<span class="upload_ing" style="display:none;"></span>';
                d += '<span class="upload_maxnum" style="display:none;">\u4e0a\u4f20\u6210\u529f\u3002\u60a8\u5df2\u7ecf\u4e0a\u4f20\u4e86' + a.c.Uploader.MaxNum + "\u5f20\u56fe\u7247\uff0c\u5982\u679c\u60a8\u8fd8\u60f3\u4e0a\u4f20\uff0c\u53ea\u80fd\u5220\u9664\u5df2\u4e0a\u4f20\u7684\u56fe\u7247\u3002</span>";
                d += "</div>";
                if (a.c.Uploader.isFlashCate()) d += '<div>\u70b9\u51fb\u8fd9\u91cc\u5c1d\u8bd5 <a href="javascript:void(0);" onclick="$.c.Uploader.changeVersion(); $.c.Uploader.addTrack(0);" style="font-size:12px;">\u65b0\u7248\u56fe\u7247\u4e0a\u4f20\u529f\u80fd</a>\uff1a\u652f\u6301\u591a\u9009\u56fe\u7247</div>';
                d += '<input type="hidden" id="backFunction" name="backFunction" value="$.c.Uploader.finish" />';
                d += '<input type="hidden" name="Pic" id="Pic" value="" />';
                d += '<input type="hidden" name="PicDesc" id="PicDesc" value="" />';
                d += '<input type="hidden" name="PicPos" id="PicPos" value="0" />';
                a.c.Uploader.UploadPanel.append(d);
                a("#uploadPic :file").bind("change", a.c.Uploader.uploadCheck);
                a.c.Uploader.loadDefaultPics()
            }
        },
        addTrack: function(c) {
            try {
                c == 1 ? _gaq.push(["pageTracker._trackEvent", "58_post", "click", "upload_return_old_link"]) : _gaq.push(["pageTracker._trackEvent", "58_post", "click", "upload_return_new_link"])
            } catch(d) {}
        },
        loadDefaultPics: function() {
            var c = a.c.Uploader.UploadPanel.attr("value");
            if (c != null && c != undefined && c != "") {
                c = c.split("|");
                a(c).each(function(d, e) {
                    if (a.c.Uploader.isNetPic(e)) {
                        var f = a.c.Uploader.cutRootUrl(e);
                        a.c.Uploader.finish(1, f);
                        a.c.Uploader.SavedNum++
                    }
                })
            }
            a.c.Uploader.showLimitNum()
        },
        isNetPic: function(c) {
            return c.match(/http:\/\//i) != null
        },
        cutRootUrl: function(c) {
            return c.replace(/http:\/\/pic.58.com/i, "")
        },
        showPic: function(c, d, e) {
            var f = e;
            switch (d) {
                case - 1 : f = "/test/uploading.gif";
                    break;
                case 0:
                    f = "/test/uploaderro.gif";
                    break;
                case 1:
                    f = a.c.Uploader.setViewMode(2, e);
                    break
            }
            d = "<li" + a.c.Uploader.appendDataAttr(d, e, c) + '><div class="displayimg"><img src="' + f + '" onerror="$.c.Uploader.reloadPic(this);" /></div>';
            d += '<input type="text" class="picDesc" onblur="$.c.Uploader.joinPicDesc(this);" /><a class="previous" href="javascript:void(0);" onclick="$.c.Uploader.changePos(this, -1);" title="\u524d\u79fb">\u4e0a\u4e00\u5f20</a><span class="front-cover">&nbsp;</span><a class="next" href="javascript:void(0);" onclick="$.c.Uploader.changePos(this, 1);" title="\u540e\u79fb">\u4e0b\u4e00\u5f20</a><a class="delete" href="javascript:void(0);" title="\u5220\u9664\u8be5\u56fe\u7247" onclick="$.c.Uploader.deletePic(this, \'' + e + "');\">\u5220\u9664\u8be5\u56fe\u7247</a></li>";
            e = a("#uploadPic ul");
            if (c == null) {
                e.append(d);
                a.c.Uploader.setPos();
                a.log("\u8bbe\u7f6e\u65b0\u7684\u4e0a\u4f20\u7d22\u5f15:" + a.c.Uploader.getPos());
                a("#uploadPic ul li:last").attr("pos", a.c.Uploader.getPos())
            } else {
                a.log("\u91cd\u7ed8\u4e0a\u4f20\u7d22\u5f15\u533a\u57df:" + c);
                a("#uploadPic ul li[pos=" + c + "]").replaceWith(d);
                a("#uploadPic div iframe[pos=" + c + "]").removeAttr("loading")
            }
            a.c.Uploader.joinPicUrl();
            a.c.Uploader.joinPicDesc(null);
            a.c.Uploader.markCover()
        },
        appendDataAttr: function(c, d, e) {
            var f = "";
            if (c == -1) f = " uploading=1";
            else if (c == 1) f = ' picUrl="' + d + '"';
            if (e != null) f += " pos=" + e;
            return f
        },
        markCover: function() {
            a("#uploadPic .front-cover").html("&nbsp;");
            a("#uploadPic .front-cover:eq(0)").html("\u5c01\u9762")
        },
        picSize: -1,
        getFileSize: function(c) {
            var d = false;
            try {
                if (c.files) {
                    a.c.Uploader.picSize = c.files[0].size;
                    d = true
                } else {
                    var e = new Image;
                    e.onload = function() {
                        a.c.Uploader.picSize = e.fileSize;
                        e.onload = e.onerror = null;
                        delete e
                    };
                    e.onerror = function() {
                        a.c.Uploader.picSize = -1;
                        e.onload = e.onerror = null;
                        delete e
                    };
                    e.src = c.value
                }
            } catch(f) {
                a.c.Uploader.picSize = -1
            }
            return d
        },
        isPicType: function(c) {
            if (c == null || c.length < 4) return false;
            return /\.(gif|jpg|png|bmp|jpeg)$/i.test(c)
        },
        uploadCheck: function() {
            if (a.c.Uploader.checkLimitNum()) if (a.c.Uploader.isPicType(this.value)) if (a.c.Uploader.getFileSize(this)) {
                if (a.c.Uploader.picSize > 0) if (a.c.Uploader.picSize / 1024 > 2048) {
                    a.c.Uploader.showUploadTip(2, "\u4e0d\u80fd\u4e0a\u4f20\u5927\u4e8e2M\u7684\u56fe\u7247");
                    return
                }
                a.c.Uploader.upload()
            } else setTimeout(function() {
                    if (a.c.Uploader.picSize > 0) if (a.c.Uploader.picSize / 1024 > 2048) {
                        a.c.Uploader.showUploadTip(2, "\u4e0d\u80fd\u4e0a\u4f20\u5927\u4e8e2M\u7684\u56fe\u7247");
                        return
                    }
                    a.c.Uploader.upload()
                },
                700);
            else a.c.Uploader.showUploadTip(2, "\u4ec5\u652f\u6301jpg/gif/bmp/png\u683c\u5f0f")
        },
        upload: function() {
            if (a("#uploadPic :file").val().length > 0) {
                var c = null;
                a.c.Uploader.showPic(c, -1, null);
                c = a.c.Uploader.getPos();
                var d = a.c.Uploader.getiframe(),
                    e = d.attr("name");
                if (d.attr("src") == "/submit.htm") a.c.Uploader.startUpload(e, c);
                else {
                    d.bind("load",
                        function() {
                            a.c.Uploader.startUpload(e, c)
                        });
                    d.attr("src", "/submit.htm")
                }
            }
        },
        getiframe: function() {
            var c = a("#uploadPic div iframe:not(#uploadPic div iframe[loading=1]):first");
            a.log("\u5df2\u83b7\u53d6\u5230\u4e00\u4e2a\u6709\u7528\u7684iframe\u7a97\u53e3\uff1a" + c.attr("id"));
            return c
        },
        getPos: function() {
            try {
                var c = a("#PicPos").val();
                if (c == null || c == "") return 0;
                return parseInt(c)
            } catch(d) {
                return 0
            }
        },
        setPos: function() {
            var c = a.c.Uploader.getPos() + 1;
            a("#PicPos").val(c)
        },
        startUpload: function(c, d) {
            var e = a('iframe[name="' + c + '"]');
            e.unbind("load");
            e.attr("loading", 1);
            e.attr("pos", d);
            a.log("%s : \u5df2\u5378\u8f7dload\u4e8b\u4ef6\u3001\u5df2\u6807\u8bb0loading=1\u3001\u5df2\u6807\u8bb0pos=%s", c, d);
            e = document.getElementById("aspnetForm");
            e.action = a.c.Uploader.actionUrl;
            e.target = c;
            e.submit();
            a.c.Uploader.setUploading();
            a.c.Uploader.SavedNum++;
            setTimeout(a.c.Uploader.clearFileValue, 800)
        },
        setUploading: function() {
            a.c.Uploader.showUploadTip(1, "\u6b63\u5728\u4e0a\u4f20\u4e2d\uff0c\u8bf7\u7a0d\u7b49\u2026\u2026")
        },
        setViewMode: function(c, d) {
            if (c > 0) d = d.replace(/\/big\//i, "/" + ["big", "small", "tiny"][c] + "/");
            a.c.Uploader.isNetPic(d) || (d = "http://pic.58.com" + d);
            return d
        },
        finish: function(c, d, e) {
            if (c == 1) {
                c = a.c.Uploader.getDelayByFileName(d);
                setTimeout(function() {
                        a.c.Uploader.showPic(e, 1, d);
                        a.c.Uploader.showLimitNum();
                        a.c.Uploader.showUploadTip(0, null)
                    },
                    c)
            } else {
                a.c.Uploader.showPic(e, 0, null);
                a.c.Uploader.showUploadTip(2, d)
            }
        },
        changePos: function(c, d) {
            var e = a("#uploadPic ul li");
            if (e.length != 1) {
                var f = a(c).parent(),
                    g = e.index(f),
                    h = g + d;
                if (h < 0) h = e.length - 1;
                else if (h == a("#uploadPic ul li").length) h = 0;
                h = a("#uploadPic ul li:eq(" + h + ")");
                f.css("opacity", 0.5);
                if (d < 0) g == 0 ? a(h).after(f) : a(h).before(f);
                else g == e.length - 1 ? h.before(f) : a(h).after(f);
                f.animate({
                        opacity: 1
                    },
                    450);
                a.c.Uploader.joinPicUrl();
                a.c.Uploader.joinPicDesc(null);
                a.c.Uploader.markCover()
            }
        },
        isLoadingState: function() {
            var c = false,
                d = a("#uploadPic ul li");
            a(d).each(function(e, f) {
                if (a(f).attr("uploading") == 1) {
                    c = true;
                    return false
                }
            });
            return c
        },
        reloadPic: function(c) {
            var d = a.c.Uploader.getRightPicUrl(c.src),
                e = a(c).data("reload"),
                f = 0;
            if (e) f = parseInt(e, 10);
            if (f < 3) {
                f++;
                setTimeout(function() {
                        c.src = d + "?rnd=" + Math.random();
                        a(c).data("reload", f)
                    },
                    1500)
            }
        },
        showUploadTip: function(c, d) {
            a("span.upload_ok").hide();
            a("span.upload_ing").hide();
            a("span.upload_error").hide();
            a("span.upload_maxnum").hide();
            switch (c) {
                case 0:
                    a.c.Uploader.SavedNum == a.c.Uploader.MaxNum ? a("span.upload_maxnum").show() : a("span.upload_ok").show();
                    break;
                case 1:
                    a("span.upload_ing").show().html(d);
                    break;
                case 2:
                    a("span.upload_error").show().html(d);
                    break
            }
        },
        showLimitNum: function() {
            var c = a.c.Uploader.MaxNum - a.c.Uploader.SavedNum;
            a('#uploadPic font[name="limitNum"]').html(c);
            a("span.upload_ok").show();
            a("span.upload_error").hide()
        },
        checkLimitNum: function() {
            return a.c.Uploader.MaxNum - a.c.Uploader.SavedNum > 0
        },
        joinPicUrl: function() {
            var c = [];
            a("#uploadPic ul li").each(function(d, e) {
                var f = a(e).attr("picUrl");
                if (f) c[c.length] = f
            });
            a("#Pic").val(c.join("|"))
        },
        joinPicDesc: function(c) {
            c != null && a(c).val(c.value.substring(0, 6));
            var d = [];
            a("#uploadPic .picDesc").each(function(e, f) {
                d[d.length] = a(f).val()
            });
            a("#PicDesc").val(d.join("|"))
        },
        deletePic: function(c) {
            c = a(c).parent();
            c.attr("picUrl");
            var d = c.attr("pos");
            a("#uploadPic div iframe[pos=" + d + "]").removeAttr("loading").removeAttr("pos");
            a.log("\u5220\u9664\u56fe\u7247- \u6062\u590d\u5bf9\u5e94\u7a97\u53e3\u7684\u53ef\u4e0a\u4f20\u5c5e\u6027, pos=%s", d);
            c.remove();
            a.c.Uploader.SavedNum--;
            a.c.Uploader.showLimitNum();
            a.c.Uploader.joinPicUrl();
            a.c.Uploader.joinPicDesc(null);
            a.c.Uploader.markCover();
            a.c.Uploader.showUploadTip(0, null)
        },
        clearFileValue: function() {
            if (document.all) a("#uploadPic :file").get(0).outerHTML = '<input type="file" name="fileUploadInput" id="fileUploadInput">';
            else a("#uploadPic :file").val("");
            a("#uploadPic :file").bind("change", a.c.Uploader.uploadCheck)
        },
        stopUploading: function() {
            if (a.c.Uploader.isLoadingState() != false) {
                a("#uploadPic div iframe").removeAttr("src").unbind("load");
                a("#uploadPic ul li").removeAttr("uploading")
            }
        },
        getDelayByFileName: function(c) {
            var d = 0;
            if (a.browser.msie) {
                var e = a.browser.version;
                if (e == 7 || e == 8) {
                    c = c.toLowerCase();
                    if (c.indexOf(".gif") > 0) d = 1
                }
            }
            return [1500, 2500][d]
        },
        getRightPicUrl: function(c) {
            return c = c.replace(/\?rnd=(.*)/i, "")
        },
        flashFrameLoaded_Method: null,
        flashFrameLoaded: function() {
            if (a.c.Uploader.flashFrameLoaded_Method != null) try {
                a.c.Uploader.flashFrameLoaded_Method()
            } catch(c) {}
        },
        loadFlashVersion: function() {
            if (a.c.Uploader.isFlashCate()) {
                var c = a.c.common.getExt("uploadurl");
                if (c == null || a.browser.msie && a.browser.version == 9) c = "http://lieche.58.com/flashupload/";
                c += "index.html?rnd=" + Math.random();
                var d = [];
                d.push('<tr id="trFlashUpload"><th>\u4e0a\u4f20\u56fe\u7247</th>');
                d.push('<td valign="top"><div><iframe onload="$.c.Uploader.flashFrameLoaded();" allowtransparency="true" id="frmFlashUpload" src="' + c + '" width="' + (a.c.Uploader.isFromVip() ? "695px": "820px") + '" height="65px" scrolling="no" frameborder="0"></iframe></div></td>');
                d.push("</tr>");
                c = d.join("");
                a.c.Uploader.UploadPanel.parent().parent().after(c);
                a.c.Uploader.isFlashVersion ? a.c.Uploader.UploadPanel.parent().parent().hide() : a("#trFlashUpload").hide();
                c = a("#trFlashUpload td div").height();
                a("#trFlashUpload td:eq(1)").height(c)
            }
        },
        getPicFromFlash: function() {
            var c = "";
            try {
                if (!a.c.Uploader.isFlashCate()) return;
                var d = a("#frmFlashUpload");
                if (d.length > 0) {
                    var e = d.get(0).contentWindow.document.getElementById("Pic");
                    if (e) c = e.value
                }
            } catch(f) {}
            return c
        },
        changeVersion: function() {
            if (a.c.Uploader.isFlashVersion) {
                a.c.Uploader.UploadPanel.parent().parent().show();
                a(".loadbutton").show();
                a("#uploadPic").children("ul").show();
                a.c.Uploader.hideFlashVersion();
                a.c.Uploader.isFlashVersion = false
            } else {
                a.c.Uploader.UploadPanel.parent().parent().hide();
                a(".loadbutton").hide();
                a("#uploadPic").children("ul").hide();
                a.c.Uploader.showFlashVersion();
                a.c.Uploader.isFlashVersion = true
            }
        },
        hideFlashVersion: function() {
            a("#trFlashUpload td").css("padding-bottom", "0px");
            a("#trFlashUpload td div").css("left", "-1000px");
            a("#trFlashUpload td:eq(1)").height(0);
            a("#trFlashUpload").hide()
        },
        showFlashVersion: function() {
            a("#trFlashUpload").removeAttr("style");
            a("#trFlashUpload td div").css("left", "");
            var c = a("#trFlashUpload td div").height();
            a("#trFlashUpload td:eq(1)").height(c);
            a("#trFlashUpload").show()
        },
        showUploader: function(c) {
            if (a.c.Uploader.isFlashVersion) c == 0 ? a.c.Uploader.hideFlashVersion() : a.c.Uploader.showFlashVersion();
            else c == 0 ? a.c.Uploader.UploadPanel.parent().parent().hide() : a.c.Uploader.UploadPanel.parent().parent().show()
        },
        setPicValue: function() {
            a.c.Uploader.isFlashVersion && a("#Pic").val(a.c.Uploader.getPicFromFlash())
        },
        clearPicValue: function() {
            a("#Pic").val("");
            if (a.c.Uploader.isFlashVersion) try {
                if (a.c.Uploader.isFlashCate()) {
                    var c = a("#frmFlashUpload");
                    if (c.length > 0) {
                        var d = c.get(0).contentWindow.document.getElementById("Pic");
                        d && a(d).val("")
                    }
                }
            } catch(e) {}
        },
        autoFlashHeight: function() {
            try {
                var c = a("#frmFlashUpload").get(0).contentWindow.document.documentElement.scrollHeight;
                a("#frmFlashUpload").attr("height", c + "px")
            } catch(d) {}
        },
        setFrameHeight: function(c) {
            a("#frmFlashUpload").attr("height", c + "px");
            a("#trFlashUpload td:eq(1)").height(c)
        },
        isFlashCate: function() {
            var c = [3, 4, 187, 8640, 9224, 13941, 8512, 8703, 92, 1];
            if (a.c.common.inArray(c, ____json4fe.catentry[0].dispid)) return true;
            if (!a.c.Uploader.isFromVip()) {
                c = [5, 832, 833];
                if (a.c.common.inArray(c, ____json4fe.catentry[0].dispid)) return true
            }
            c = [12];
            if (a.c.common.inArray(c, ____json4fe.catentry[1].dispid)) if (!a.c.Uploader.isFromVip()) return true;
            if (a.c.Uploader.isFromVip()) {
                c = [251, 19, 253];
                if (a.c.common.inArray(c, ____json4fe.catentry[1].dispid)) return true
            }
            return false
        },
        isFromVip: function() {
            return ____json4fe.catentry[2].listname != "post5"
        },
        optimizeVip: function() {
            try {
                if (a.c.Uploader.isFromVip()) if (a.c.Uploader.isFlashVersion) if (document.getElementById("frmFlashUpload").contentWindow.document.getElementById("SWFUpload_0") == null) a.c.Uploader.changeVersion();
                else a.c.Uploader.isSupportFlash() || a.c.Uploader.changeVersion()
            } catch(c) {}
        },
        isSupportFlash: function() {
            var c = true;
            if (a.browser.msie) try {
                new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
                c = true
            } catch(d) {
                c = false
            } else try {
                if (navigator.plugins["Shockwave Flash"]) c = true
            } catch(e) {
                c = false
            }
            return c
        }
    }
})(jQuery);


